posted 13 years ago
Hi,
What kind of mapping will we have if we have additional fields in middle table, other than the foreign keys connecting the 2 tables?
Existing:
Student(key:studentid, column:name)
Student_courses (foreign keys studentid and courseid) <---middle table
Courses(key:courseid, column:description)
New:
Student(key:studentid, column:name)
Student_courses (foreign keys studentid and courseid, ADDITIONAL FIELDS: 2 NON-KEY FIELDS: STARTDATE AND ENDDATE) <---middle table
Courses(key:courseid, column:description)
As seen above, i added startdate and enddate, 2 strings.
Existing hibernate will be like this:
and
Will you let me know how the new one will be?