how can i set constraint

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how can i set constraint

Pal Infocom Technologies-2
how can i set a column constraint on table so that it accepts unique values only
Reply | Threaded
Open this post in threaded view
|

Re: how can i set constraint

Jacques Le Roux
Administrator
Just create a isUnique method in UtilValidate Class and set the validate atribute in your entity with it.

There is another way creating a new field type : BTW this might be contributed, just create a Jira issue and a patch ;o)
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices

Jacques

De : "amit charaya" <[hidden email]>
>
> how can i set a column constraint on table so that it accepts unique values
> only
> --
> View this message in context: http://www.nabble.com/how-can-i-set-constraint-tf4149619.html#a11804971
> Sent from the OFBiz - User mailing list archive at Nabble.com.