Home  >  Forum  >  Hibernate
Post New Query

one-to-many collections with identifiers are not supported


joined on
March 16,2013
Asked on June 01,2013
Hi All,

Need help for below error. I am using  @CollectionId but got below error.

org.hibernate.MappingException: one-to-many collections with identifiers are not supported
at org.hibernate.persister.collection.AbstractCollectionPersister.<init>(AbstractCollectionPersister.java:424)
at org.hibernate.persister.collection.OneToManyPersister.<init>(OneToManyPersister.java:84)
at org.hibernate.persister.PersisterFactory.createCollectionPersister(PersisterFactory.java:104)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:316)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
joined on
May 11,2013
Replied on June 01,2013

Error clearly says that @CollectionId should not be used with one-to-many. You can use it with many-to-many mapping.

Write Answer








Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us