Hi!
Thanks for the immediate reply. That's terrific in this forum.
No, I don't save these roles explicitely. And I also don't want to save them. I just want to have these entries in UserRole.
The function this problems belongs to is "add a new user". so i only want to assign user to his roles, not add new ones in the DB.
Example:
new user(
john@somedomain.com, mypassword) + selected role: CEO
Then I want hibernate to add an entry in UserRole, so
userid: 1 (for john) + role id 1 (for CEO)
Regards,
- Markus