Using Hibernate 2.0.3, the following snippet of hbm.xml
Code:
<many-to-one
name="fromUser"
class="bb.model.User"
cascade="none"
outer-join="auto"
update="true"
insert="true"
column="UserId"
/>
<many-to-one
name="toUser"
class="bb.model.User"
cascade="none"
outer-join="auto"
update="true"
insert="true"
column="UserId"
/>
results in
"Repeated column in mapping for class bb.model.MessageHeader should be mapped with insert="false" update="false": UserId".
These aren't derived properties. Each instance of this object really is associated with two users: A sender and a receiver.
What have I done wrong here?
TIA.
Joe