Sparx Systems Forum

Enterprise Architect => Suggestions and Requests => Topic started by: jButtkus on January 11, 2006, 04:08:43 am

Title: set a combination of columns of a table as unique
Post by: jButtkus on January 11, 2006, 04:08:43 am
Is it possible in EA to set a combination of columns as unique?
So the generated ddl output will look like this:
----------------------------------------------------------
CREATE TABLE uniquetest
(
 a int4 ,
 b int4 ,
 c int4,
 CONSTRAINT uniquetest_pkey PRIMARY KEY (a, b),
 CONSTRAINT uniquetest_mandant_key UNIQUE (a, c)
)
----------------------------------------------------------
When i set the columns in EA separately as UNIQUE the
ddl script declares the columns separately as UNIQUE as well. :P

Any ideas?  ???  
Title: Re: set a combination of columns of a table as uni
Post by: thomaskilian on January 11, 2006, 11:45:10 am
This already works: Create an operation in the table and stereotype as <<unique>>. Then add the related columns. This will create the DDL as you wish.
Title: Re: set a combination of columns of a table as uni
Post by: jButtkus on January 12, 2006, 01:16:19 am
Ah, this way it works...

Thanks alot!