Author Topic: set a combination of columns of a table as unique  (Read 2545 times)

jButtkus

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • keep on smurfin'
    • View Profile
set a combination of columns of a table as unique
« 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?  ???  

thomaskilian

  • Guest
Re: set a combination of columns of a table as uni
« Reply #1 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.

jButtkus

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • keep on smurfin'
    • View Profile
Re: set a combination of columns of a table as uni
« Reply #2 on: January 12, 2006, 01:16:19 am »
Ah, this way it works...

Thanks alot!