Hi Christoph,

Even though I've never used it, I think you can use one variation of the 
addUniqueIndex method in the ERXMigrationTable class to add the unique 
constraint in the database using migrations. Then you can use the 
ERXEOControlUtilities.validateUniquenessOf method to check the uniqueness 
programmatically and avoid database exceptions.

Unfortunately, I don't know any option to activate this behavior through 
EOModeler.

Cheers,

Henrique

On 19/07/2013, at 10:41, Christoph Wick <[email protected]> wrote:

> Hello list,
> 
> is there an easy, WO-style way to ensure the uniqueness of entity properties?
> 
> SQL supports it (by making columns UNIQUE), but I didn't find anything in 
> EOModeler as well as in ERXMigration.
> 
> There is ERXEOControlUtilities.validateUniquenessOf(...) but I think this 
> doesn't use the database level (so I think it MAY fail in a multi instance 
> deployment).
> 
> Thanks in advance.
> C.U.CW
> -- 
> What are the three enemies of a programmer? Sunlight, oxygen, and the 
> appalling roar of the birds.
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/hprange%40gmail.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to