I must have been in a weird state as the dialog for creating the Distinct 
setting was not showing up.

But we are working fine (and I also use postgresql so I project no problems)


Ted

--- On Fri, 3/30/12, Paul Hoadley <[email protected]> wrote:

> From: Paul Hoadley <[email protected]>
> Subject: Re: unique constraint
> To: "Theodore Petrosky" <[email protected]>
> Cc: [email protected]
> Date: Friday, March 30, 2012, 8:37 PM
> Hi Ted,
> 
> On 31/03/2012, at 5:48 AM, Theodore Petrosky wrote:
> 
> > Is there a way to put a unique constraint on an
> attribute in Entity Modeler and have it create the
> migrations. I don't see anything in any of the menus.
> 
> 1.  Right-click entity, select "New Entity Index".
> 
> 2.  Give the index a name, select "Distinct" for
> Constraint, select the attribute in the drop-down at the
> bottom and click "Add".
> 
> 3.  Generate migration.
> 
> Whether this works might be database-plugin-dependent, but I
> can vouch for PostgreSQL.  It should generate something
> like this:
> 
> personTable.addIndex(new
> ERXMigrationIndex("person_username_key", true, new
> ColumnIndex("username")));
> 
> 
> -- 
> Paul.
> 
> http://logicsquad.net/
> 
> 
> 

 _______________________________________________
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