Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Hibernate to eclipselink port, multiple entity class search
Hibernate to eclipselink port, multiple entity class search [message #726420] Sun, 18 September 2011 00:52 Go to next message
Jonathan  is currently offline Jonathan Friend
Messages: 6
Registered: August 2011
Junior Member
I'm currently attempting to port a hibernate application to eclipselink for multi-tenancy support.

One of the things I'm struggling with is querying multiple entity classes. Hibernate allows you to perform queries such as:

Select a, b, c From Apple a, Banana b, Cat c WHERE = AND =

Hibernate manages performing a cartesian join. I know this isn't ideal and I don't have access to the JPQL that is being sent over the wire. In eclipselink I find that I can't seem to do the same thing. It attempts to choose the first class in the FROM statement as the reference class. It will then blow up if you try and reference any of the other entities within the WHERE clause.

Are there any suggestions? I've started tinkering with unwrapping the entitymanager and issuing queries with the readallquery but with no luck.

I'm currently using eclipselink 2.3.0 (I have also attempted with 2.3.1-M5 with no luck).

Any help or suggestions would be greatly appreciated.
Re: Hibernate to eclipselink port, multiple entity class search [message #726866 is a reply to message #726420] Mon, 19 September 2011 18:30 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

That is valid JPQL, although not very efficient. It should work in EclipseLink, what error do you get?

James : Wiki : Book : Blog : Twitter
Previous Topic:When an Entity has two different relationships to another Entity which is identified by Compound PKs
Next Topic:(no subject)
Goto Forum:

Current Time: Sun Apr 18 12:55:20 GMT 2021

Powered by FUDForum. Page generated in 0.02058 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top