Register / Login
Object Relational Mapping
Doubt in JPA mapping
Pedro Lobato Sena
posted 7 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
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?