Let's say I have already created my Database in Oracle. One of my Tables has the following statement:
CREATE UNIQUE INDEX "SOME_NAME" ON "SOME_TABLE_NAME" (COLUMN1,COLUMN2)
I want to make sure that my hibernate entity is aware of that.
- Looks like
@UniqueConstraint
annotation can't be used here because of it is only used if table generation is in effect. - Also I noticed that
CREATE UNIQUE INDEX "SOME_NAME" ON "SOME_TABLE_NAME" (COLUMN1,COLUMN2)
is not working in my H2 database.
Is there a way to make sure that my entity will be aware of that restriction?