Hi,
basically, you don't need a generated ID for the mapping table because the pair
"role_id/function_id" is already a valid primary key.
If you need a id column anyway, you have to build a mapping entity with a generated ID
property and two @OneToMany relationship fields to Role and Function.
So your code for mapping a function to a role could be:
| RoleToFunction role2FunctionNew = new RoleToFunction();
| role2FunctionNew.setFunction(...);
| role2FunctionNew.setRole(...);
|
| role.getFunctionmappings().add (role2FunctionNew);
|
Hope this helps
Wolfgang
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263154#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...