[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] N-M-Table and Additional Fields
|
Hi everybody,
I have following scenario:
2 Tables with a n-m-relation. That means, I have a third table for the
n-m-Relation. In this third table I have additional fields.
artificial Example:
Person has a Job and the Job could be done from more tha one Person. But the
salary is not for every Person and Job the same.
Tables:
Person(id, name)
Job(id, title)
Person_has_Job(person_id, job_id, salary)
Ok. How is the JPA realisation? ;-)
I can work with ManyToMany and I can define with JoinTable the n-m-table.
But how is it possible to set the salary value in a (transient) property of
Job (Job#salary)
I think the example and the reason are clear. Howevery I do not know the
best solution with JPA.
Any Hints?
Thanks in advance!
M.Joe
--
View this message in context: http://www.nabble.com/N-M-Table-and-Additional-Fields-tp22522463p22522463.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.