mysql - Composite Unique Index created on each deploy -
i'm using spring 3.2 hibernate 4.2.1.final , mysql 5.5.
each time reload webapp hibernate creates new composite unique index of entities.
for example in entity have:
@table(uniqueconstraints = { @uniqueconstraint(columnnames = { "field1", "field2" }) })
on each deploy have new unique index on 2 field.
is bug?
thank marco
you have give name of composite unique index key
eg:
@table(uniqueconstraints = { @uniqueconstraint(name="field1_field2_unique_key", columnnames = { "field1", "field2" }) })
here composite unique index key name : field1_field2_unique_key
Comments
Post a Comment