Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/DesignDocs/312146"
Line 38: | Line 38: | ||
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=321724 support connect by] | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=321724 support connect by] | ||
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=321725 support common functions] | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=321725 support common functions] | ||
+ | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=350597 JPA 2.1 sub select in functions, having, select, from] | ||
Other JPQL bugs: | Other JPQL bugs: | ||
Line 43: | Line 44: | ||
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=331124 join to element collection does not work] | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=331124 join to element collection does not work] | ||
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=331969 join ignored] | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=331969 join ignored] | ||
− | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=347562 group by ignored] | + | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=347562 group by ignored] [https://bugs.eclipse.org/bugs/show_bug.cgi?id=227347] |
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=300625 duplicate join in sub select] | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=300625 duplicate join in sub select] | ||
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=267767 package with order fails to parse] | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=267767 package with order fails to parse] | ||
Line 59: | Line 60: | ||
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=303268 expression order in jpql causes error] | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=303268 expression order in jpql causes error] | ||
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=303767 join fetch ignored] | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=303767 join fetch ignored] | ||
+ | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=357843 dot removes outer join] | ||
+ | * [https://bugs.eclipse.org/bugs/show_bug.cgi?id=275449 is not null should be used] | ||
= Concepts = | = Concepts = |
Revision as of 13:45, 4 October 2011
Design Specification: Enhanced JPQL
Document History
Date | Author | Version Description & Notes |
---|---|---|
2011-10-04 | James | 0.1 Draft |
Project overview
JPQL currently offers a sub-set of SQL functionality. Some queries that are possible using SQL cannot be defined using JPQL.
It is desired to make EclipseLink's JPQL support be more complete of what is possible in SQL.
A key requirement from users (#1 voted enhancement) is to have ON clause support in JPQL.
Other missing features of SQL could also be added to JPQL, such as sub selects in the SELECT from FROM clauses, and enhanced function support.
Other JPQL enhancements:
- allow qualified class names in from clause
- allow alias on join fetch
- support for cast function
- group by fails in in
- support union and intersect
- support platform independent functions and custom operators
- support nested join fetches
- support connect by
- support common functions
- JPA 2.1 sub select in functions, having, select, from
Other JPQL bugs:
- incorrect SQL for distinct
- join to element collection does not work
- join ignored
- group by ignored [1]
- duplicate join in sub select
- package with order fails to parse
- stack overflow parsing query
- join of map fails
- plus not aliasable
- sub-string fails
- element collection fails with in
- count distinct fails
- bad sql for in [2] [3]
- jpql sub selects incorrect
- member of fails
- concat fails in subquery
- support inner joins in from clause
- expression order in jpql causes error
- join fetch ignored
- dot removes outer join
- is not null should be used
Concepts
ON clause : the SQL clause part of the FROM clause that defines how to tables are joined, this can be used for both joins and outer joins, but is required for outer joins.
outer join : A join where if a row in the source table has no joined rows in the target table it is still included in the join result with a null row for the target table.
ANTRL : Third party library currently used in EclipseLink for parsing JPQL.
Hermes : New JPQL parser developed by Dali project for parsing JPQL at design time. Currently included in EclipseLink SVN, but not currently used.
Requirements
- Support additional ON clause for a relationship join.
- Support an ON clause on the join for two independent objects.
Design Constraints
- Outer join capabilities differ in different databases.
- SQL capabilities differ in different databases.
Functionality
Testing
API
Native API
Config files
Documentation
Open Issues
Issue # | Owner | Description / Notes |
---|---|---|
1 | Which JPQL parser should be used ANTLR or Hermes? |
Decisions
Issue | Description / Notes | Decision |
---|
Future Considerations
- Other JPQL enhancements.