|
Consider what the documentation says:
http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html_single/#tutorial-associations-valuecollections
When you define a collection of values (like eMailAddresses), the corresponding table (PERSON_EMAIL_ADDR in the example) should have a primary key made up of both the key column and the element column. However, if you define such a collection in your hbm.xml Hibernate creates a table without any primary key.
See also:
https://forum.hibernate.org/viewtopic.php?f=1&t=958891
https://forum.hibernate.org/viewtopic.php?f=1&t=973302
|