Results 1 to 3 of 3
Thread: problems with JPA
- 06-25-2007, 09:32 PM #1
Senior Member
- Join Date
- Jun 2007
- Posts
- 110
- Rep Power
- 0
problems with JPA
I have an entity named Employee
the employee has a name, and a collection of "superiors" and collection of "subordinates"
I have 2 tables:
table A= where I save the id and the name
table B= where I save the id, one to the subordinate and the other to the superior
So, If I have an user named "John" and other named "Mary"
I do something like that
john.setSuperior(Mary) that is to say that john is Mary's subordinate
the tables have a many to many relationship
when I search "john" y do "getSuperiors()" and it returns to me
Mary
but If I do mary.getSubordinates() it doesn't return to me nothing.
What is the problem?
- 07-04-2007, 06:29 AM #2
Senior Member
- Join Date
- Jun 2007
- Posts
- 164
- Rep Power
- 14
Can you paste the code of the setSuperior method?
I guess that there is the problem, the insertion.
- 07-04-2007, 06:34 AM #3
Senior Member
- Join Date
- Jun 2007
- Posts
- 130
- Rep Power
- 0
Similar Threads
-
Problems in JSP : Need help
By raj4u in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 02-07-2008, 11:06 AM -
GUI problems.
By saytri in forum New To JavaReplies: 1Last Post: 12-16-2007, 11:27 PM -
gui problems
By bluebirdjc in forum Advanced JavaReplies: 2Last Post: 07-23-2007, 06:38 PM -
a few problems
By gary in forum AWT / SwingReplies: 0Last Post: 07-11-2007, 05:57 PM -
Problems with the jar
By Freddie in forum NetBeansReplies: 2Last Post: 05-29-2007, 04:50 PM
Bookmarks