Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] How to left join with expression

Hey there...

I think, I didn't really get the expression language yet.
I have two classes:

Offer and Publication

An Offer can have multiple publications, from which only the youngest is interesting for me. For architectural reasons, the offer-object has no reference to the publication(s). Only the publication has a refence to the object.

How do I get an SQL like this with expression language?

SELECT 	offer.id,
	publication.id
FROM
	Offer offer
LEFT OUTER JOIN PUBLICATION pub ON pub.offer_id = offer.id
WHERE NOT EXISTS (not so important subquery)


I tried different ExpressionBuilders, but nothing seemed to work. The result was always wrong way around: pub left outer join offer.

Thanx in advance!

Andreas




--
Andreas König
Developer

andreas.koenig@xxxxxxxxxx

serie a logistics solutions AG
Hülchrather Straße 15
D-50670 Köln

T +49 221 500 60 7-21
F +49 221 500 56 85

Vorstand: Axel Löhr, Erwin Soldo
Aufsichtsrat: Adam Musialik (Vors.), Fritz Pleitgen, Hans Jörg Klofat

Amtsgericht Köln HRB 61725

www.serie-a.de




Back to the top