Mapping a child entity collection from two different parent entities results in duplicate backref property exception when configuring the session factory. Error log is:
org.hibernate.MappingException: Duplicate property mapping of _mappingsBackref found in domain.AttributeMapping
at org.hibernate.mapping.PersistentClass.checkPropertyDuplication(PersistentClass.java:477)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:467)
at org.hibernate.mapping.RootClass.validate(RootClass.java:215)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1149)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1334)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at hibernate.Insert.main(Insert.java:22)
Seems to be the same kinf of issue as
Attached project reproduces the issue
hibernate-core-3.3.2.GA, hibernate-annotations-3.4.0.GA, hibernate-c3p0-3.3.2.GA, hsqldb-1.8.0.10.jar