Details
-
Bug
-
Resolution: Done
-
Major
-
Preview 3
-
None
-
None
Description
When a field is part of a composite key (via @Dependent) is also referenced in a JoinColumn for a OneToMany or ManyToOne relationship Hiberate produces the following error:
I Depend On:
Depends On Me: org.hibernate.MappingException: Repeated column in mapping for c
lass org.jboss.tutorial.composite.bean.Customer should be mapped with insert="false" update="false": flightId
According to Hibernate discussions this problem can be fixed by marking the OneToMany as "update=false, insert=false" however this doesn't seem to be part of the 3.0 spec.
For Example:
http://forum.hibernate.org/viewtopic.php?t=927072&highlight=
<many-to-one name="mtcepByCcidAndNcell"
update="false"
insert="false"
class="se.ericsson.lmc.ccl.model.dto.temp_lmcfrob_hbm.hibernate.Mtcep">
<column name="ccid"/>
<column name="ncell"/>
</many-to-one>