Register / Login
Win a copy of
Java Mock Exams (software)
this week in the
Programmer Certification (OCPJP)
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Object Relational Mapping
Doubt in JPA mapping
Pedro Lobato Sena
posted 8 years ago
I have the following scenario:
Trip has two colums: traveler_id and requestor_id
Person has one column: idPerson
I need to map the Trip to have two instances of Person, one indicating who will be the responsable by the travel(traveler_id) and the another one indicating who requested the trip.
I tried to use two @ManyToOne, but got the message indicating that I
use insertable and updatable false for one of them, that is not what I want.
How should I map it ?
Thanks in advance,
SCWCD<br />SCJP<br /> <br />Pedro Henrique Lobato Sena
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
Boost this thread!
Passed Part 2/3 with 100
how to create file in jsp?
Is Certification really worth it ?
JPA: multiple many-to-many realationships between same two tables?