Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/JPA 2.0/jpql"

(Issue Summary)
Line 8: Line 8:
  
 
* Navigation across embeddeds (e.g. select e from Entity e where e.embedded.value = :value)
 
* Navigation across embeddeds (e.g. select e from Entity e where e.embedded.value = :value)
* [[Key/Value/Entry access for maps]] (e.g. select KEY(m) from Entity e join e.map m where VALUE(m) = :value) - depends on [[EclipseLink/Development/JPA2.0/Extended_Map_support | Extended Maps ]]
+
* [[Key/Value/Entry access for maps#Maps]] (e.g. select KEY(m) from Entity e join e.map m where VALUE(m) = :value) - depends on [[EclipseLink/Development/JPA2.0/Extended_Map_support | Extended Maps ]]
 
* Add an "AS" keyword to Select (e.g. select e as y from Entity e)
 
* Add an "AS" keyword to Select (e.g. select e as y from Entity e)
 
* Added alloable arguments to constructor expressions (e.g. select new MyObject(e, 11) from Entity e)
 
* Added alloable arguments to constructor expressions (e.g. select new MyObject(e, 11) from Entity e)

Revision as of 11:24, 28 May 2009

JPQL Updates

JPA 2.0 Root | Enhancement Request

Issue Summary

JPA 2.0 introduces a number of JPQL updates. Each upate will implemented as either one or two of small features. For features where there is no current EclipseLink Expression framework support, Expression support will be first added. When Expression Framework support is available, our JPQL parser will be updated to make use of that support.

The following is the list of changes to JPQL we are currently aware of:

  • Navigation across embeddeds (e.g. select e from Entity e where e.embedded.value = :value)
  • Key/Value/Entry access for maps#Maps (e.g. select KEY(m) from Entity e join e.map m where VALUE(m) = :value) - depends on Extended Maps
  • Add an "AS" keyword to Select (e.g. select e as y from Entity e)
  • Added alloable arguments to constructor expressions (e.g. select new MyObject(e, 11) from Entity e)
  • Subselects can now collection information (e.g. select e from Entity e where e.id in (select a.id from AEntity a join a.collection c where .....)
  • IN can now take a collection as a parameter (e.g. select e from Entity e where e.id in :value)
  • Expressions referring to collection members now use entity_or_value_expression
  • Entity type Expressions have been added (e.g. select e from EntitySuperClass e where TYPE(e) = EntitySubclass.class)
  • Case Expression have now been added (e.g. updateEntity e SET e.value = CASE WHEN e.value2 = 1 THEN 11 WHEN e.value2 = 2 THEN 22 ELSE 0

END

  • A list Index operator has now been added for ordered lists - depends on Ordered lists
  • Concat can now take an additional argument

Feature design

Maps

Expression Design

JPQL

Back to the top