sql - Hibernate Annotations Id for table with no primary key -


i have table has no primary key, , 1 cannot created either. can construct unique key using 3 columns of table. hibernate demands id every annotated class, how satisfy id unique id can create.

if entity type should use composite key. can done moving primary key fields separate class , mapping in entity class @id annotation.

see mapping composite primary keys , foreign keys composite primary keys

if not entity value type should map accordingly. see https://stackoverflow.com/a/1696146/324900 , entity , value types in hibernate


Comments

Popular posts from this blog

All overlapping substrings matching a java regex -

c++ - Using OpenSSL in a multi-threaded application -

php - Deleting/Renaming a locked file -