I have the following tables: users: userID primaryKey usersDependencies: userID, dependentUserID
Ex:
users: 1, 2, 3, 4, 5
usersDependencies:
1, 2
1, 3
1, 4
2, 3
and the following components:
User.cfc
component persistent="true" output="false" table="users"
{
property name="userID" type="int" unSavedValue="0" fieldtype="id" unique="true" notnull="true" generator="native" default="0" setter="false";
property name="dependencies" fieldtype="many-to-many" cfc="UserDependency" fkColumn="userID" inverseJoinColumn="dependentUserID"
singularname="dependency" type="array" cascade="all" linktable="usersDependencies" ;
}
UserDependency.cfc
component persistent="true" output="false" table="usersDependencies"
{
property name="userID" fieldtype="id,many-to-one" fkcolumn="userID" cfc="User" insert="false" update="false";
property name="dependentUserID" fieldtype="id,many-to-one" fkcolumn="userID" insert="false" update="false";
}
But the above mapping generates the following error: Repeated column in mapping for entity: UserDependency column: userID (should be mapped with insert="false" update="false")
Any idea how to set them?
Thanks