Guys,
I have four tables with the following scenario
Table Role
- roleId
Table RoleUACP
- roleUACPId
- roleId
- uacpId
Table UACP
- uacpId
- userId
Table User
- userId
[Role] 1<--->* [RoleUACP] *<--->1 [UACP] *<--->1 [User]
I'm creating a mapping in Role, to get all unique Users belong to each role. But to get to User table, i have to join Role to RoleUACP to UACP, then User. I'm hesitant to create a class definition for RoleUACP and UACP since they're just relationship tables with no business data.
Please let me know how to write a mapping for this situation.
Thanks.
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html