User development,

A new message was posted in the thread "seam generate entities for many-to-many 
relationships":

http://community.jboss.org/message/518777#518777

Author  : Wouter Hartog
Profile : http://community.jboss.org/people/wouterhartog

Message:
--------------------------------------------------------------
Found the solution:
I had to define my UserRole table different.
I had one UserRoleID column as the primary key, and the userId and roleId as 
just FK to the other tables, like this:
userRoleId (PK)
roleId (FK)
userId (FK)
 
When I changed the table structure to this (removed the original PK column):
roleID (PK, FK)
userId (PK, FK)
 
seam generate entities worked as I wanted to: on the Entity class User, I had a 
@ManyToMany annotation, linking to the Role table, using the UserRole table as 
the joinTable.
 
a great tool!

--------------------------------------------------------------

To reply to this message visit the message page: 
http://community.jboss.org/message/518777#518777


_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to