How to create unique constraints using hibernate for an existing table -


i have existing table in database , want update table adding unique constraints it.

i have updated model class appropriate annotations related unique constraints. now, if call localsessionfactorybean.updatedatabaseschema() method, unique constraints not created, when first drop table , call localsessionfactorybean.updatedatabaseschema() method creates unique constraints in table.

how can create unique constraints existing table using hibernate without dropping table?

also let me know whether feasible in hibernate or not?


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -