JPQL queries always generating LEFT OUTER JOINs... (???)
843830Apr 1 2010 — edited Apr 3 2010Hi all,
I am actually designing, tuning the Oracle Database in a three tier architecture with a JBoss app/server for a client. Java persistence is of course very much related to my activities.
Now, one thing puzzling me, is, that hibernate, and in fact HQL seems to be generating always LEFT OUTER JOINs in order to (eager-) load the related entities of the entity initially queried.
Our java-programmers now of the lazy loading alternative, but which only seems to influence the fact of whether you are joining the related entities or not at all.
But what about the JOIN method?
From a DB point of view, in a sound database model, INNER JOIN should absolutely suffice in more than 90% of the cases, that says my experience from database development (PL/SQL in database driven apps).
Does anybody know of a way to influence the JOIN method in fetching the related entities?
We are using JBoss, but I guess, the issue is the same what ever app-server you may be using.
Many thanks in advance,
Xenofon.