JPQL simple Child query generates unnecessary Table Join
--------------------------------------------------------
Key: OPENJPA-1553
URL: https://issues.apache.org/jira/browse/OPENJPA-1553
Project: OpenJPA
Issue Type: Bug
Components: jpa
Affects Versions: 2.0.0-beta2
Environment: Java 6
Reporter: bernard
The attached testcase demonstrates that for a basic child query, OpenJPA
generates SQL that contains two joined tables where only one is required.
SELECT t0.id, t1.id FROM Child t0 LEFT OUTER JOIN Parent t1 ON t0.PARENT_ID =
t1.id WHERE (t0.PARENT_ID = ?)
This creates performance issues. Please note that this is a simplified testcase
- performance issues are of course not present in it.
It can be expected that JPA that provides a layer of abstraction by nature,
generates optimized SQL.
In light of the fact that this is a 2.0 release, the priority of solving this
should be high.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.