I have a table that contains contacts (think people) and another table that contains information about a system and who is responsible for aspects of the system (think owner, project manager, sys admin, etc)
Each system row has a column for each designated responsibility which holds a Foreign Key reference to the contact tables Primary Key that represents the appropriate contact (again, think person).
Here is a snipped from the POJO for my System bean (called SIP) representing the mappings for each person who has some responsibility to the system.
<snip>
Code:
@ManyToOne
@JoinColumn(name = "CONTACTID")
private Contact pm;
@ManyToOne
@JoinColumn(name = "CONTACTID")
private Contact iam;
@ManyToOne
@JoinColumn(name = "CONTACTID")
private Contact userRep;
@ManyToOne
@JoinColumn(name = "CONTACTID")
private Contact ca;
</snip>
I get the following error when I attempt to run the code:
Repeated column in mapping for entity: diacap.db.beans.SIP column: CONTACTID (should be mapped with insert="false" update="false")I am new to hibernate but I imagine from what I read, if I "insert="false" update="false"", I will not be able to change the contacts. Is there some other pattern I should be following to accomplish my goal of storing multiple contact references in the same table but keeping the values mutable?
Thanks,
Thomas