This content has been marked as final.
Show 4 replies
-
1. Re: Composite unique keys
bill.burke Jun 27, 2005 9:01 AM (in response to keeyes)composite keys cannot be autogenerated.
-
2. Re: Composite unique keys
epbernard Jun 27, 2005 7:27 PM (in response to keeyes)@Table(unique=...) // allows unique constraint on several columns
-
3. Re: Composite unique keys
keeyes Jun 27, 2005 10:42 PM (in response to keeyes)Bill
In that case, I suppose the only way is to manually alter the database
to generate that constraint
epbernard
Although I am using this option in many places, In this case I want to check Field_A + Field_B = unique and I suppose that can't be done using @Table(uniqueConstraint = ....)
Also how can I give a constraint name of myself instead of the auto generated name. -
4. Re: Composite unique keys
epbernard Jun 28, 2005 1:07 PM (in response to keeyes)It can. UniqueConstraint get an array string as column names
But you can't define your own name.