Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Join Table with additional columns: One SQL Select to fetch data?

Hi,

I am playing with additional columns in join tables.
The following example:
Customer visits some Courses
This n-m-Relation contains additional attributes in the n-m-table (join
table), for example: note, year etc.

One solution is to use @OneToMany and @ManyToOne with a concret join table
in Java, insteed of @ManyToMany.
In this Association class, is it possible to hold the additional columns
This solution is fine and worked.

In @ManyToMany is it possible to tell EclipseLink, that he use only ONE
Select statement, to get all the data from the different tables (with outer
joins etc.).
Is it possible to do this now with the OneToMany and ManyToOne?

At the moment I get a join of Customer and Courses. And EclipseLink fires
for every Course, the customer holds, an additional SQL SELECT statement to
get the data :-(

I general: I want the same SQL SELECT statement as in the ManyToMany case.
Is it possible?


Thanks for any advice!

Regards

M.Joe
-- 
View this message in context: http://www.nabble.com/Join-Table-with-additional-columns%3A-One-SQL-Select-to-fetch-data--tp24304704p24304704.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top