Hello,
i have trouble with a many to many relationship. I have a table, and a second table with dependencies:
First table:
+-------+
Users
+-------+
userId (PK)
userName
Second table:
+---------------+
UserDependencies
+---------------+
callingUserId (FK to userId)
calledUserId (FK to userId)
I want to indicate realtions between users. Something like that:
- user A (calling) has called user B (called)
- user A (calling) has called user C (called)
- user C (calling) has called user D (called)
and so on. A many to many relationship with two foreign keys representing the same primary key.
How can i do this in hibernate?
Thank you for any kind of support!
|