Hi, I have now, i fouind that online last night amend my userRole mapping thus:
Code:
<class name="UserRole" table="cmt_016_userrole">
<id name="OID" column="OID" unsaved-value="null">
<generator class="native">
</generator>
</id>
<version name="VID" column="VID" unsaved-value="negative" type="long"/>
<property name="updated" type="timestamp" column="Updated"></property>
<property name="name" column="Name"></property>
<property name="deleted" column="Deleted"/>
<set name="users" inverse="true" cascade = "all-delete-orphan" table="cmt_006_user">
<key column="UserRoleOID"/>
<one-to-many class="com.orange.componentcatalogue.dm.User"/>
</set>
</class>
However still getting the error, in the User class I have both get and set UserRole. In user role I have a set and get Users:
Code:
public Set<User> getUsers()
{
return this._users;
}
public void setUsers(Set<User> users)
{
this._users = users;
}
I didnt persist the row, as it is already in the DB, but I will be, although initial I didnt have the relationship mapping set up, which is what I am working on now.
So I am a bit lost, i admit i didnt realise i need to set up the many end, and I was dumb for not realising that, but the example I found is as above, and what you are saying, I think, is also consistant with the above.
Thanks
G[/code]