[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5836) Mapping collection of entities with same name and notnull constraints from two different entities results in duplicate property mapping of Backref
Milan Brich (JIRA)
noreply at atlassian.com
Wed Jan 12 11:58:05 EST 2011
Mapping collection of entities with same name and notnull constraints from two different entities results in duplicate property mapping of Backref
--------------------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-5836
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5836
Project: Hibernate Core
Issue Type: Bug
Components: annotations
Affects Versions: 3.5.6
Reporter: Milan Brich
Attachments: hibernate-backref-bug.zip
When two entities have OneToMany relationship to third entity and the collection name is same in both entities and nullable is set to false. Then exception written below is thrown.
Caused by: org.hibernate.MappingException: Duplicate property mapping of _parentsBackref found in cz.csas.persistence.test.Parent
at org.hibernate.mapping.PersistentClass.checkPropertyDuplication(PersistentClass.java:483)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:473)
at org.hibernate.mapping.RootClass.validate(RootClass.java:236)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1193)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1378)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:892)
... 58 more
Attached annotated entities.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list