I have a User a Role and a UserRole. UserRole represents the Join Table between 
the two.

The User has a flattened relationship through UserRole to Roles. It's marked as 
to many, list.

The Role had a flattened relationship to Users it's marked in the modeler as to 
many, read-only, list.


I want to add a standard role to the user. I fetch the role, create the user. 
The use:

newUser.addToRoles(userRole);
context.commitChanges();

And an exception gets thrown.

Cannot set the read-only flattened relationship 'users' in ObjEntity 'Role'

What am I missing? Do I need accessors for the UserRole? I thought I could 
Dispose of that class. I'm confused.

Tony Giaccone

Reply via email to