Hi all,
I have the following schema:
User (user_id, firstname, ...) user_id is pk
Department (dept_id, name, desc) dept_id is pk
Role (role_id, name, desc) role_id is pk
UserDeptRole (udr_id, user_id, dept_id, role_id)
the last is the join table (many-to-many) between user
and dept. For each user / dept assocation their can be
one role. udr_id is just an autoincrementing pk for
the table. What is the best way to model this with
Hibernate, I just have not done this with any orm
before.
Thanks!
Abdullah
|