Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350843

Summary: JPA 2.1 JPQL Generic Function support
Product: z_Archived Reporter: Gordon Yorke <gordon.yorke>
Component: EclipselinkAssignee: James Sutherland <jamesssss>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jamesssss, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
URL: http://wiki.eclipse.org/EclipseLink/DesignDocs/350843
Whiteboard:
Bug Depends on:    
Bug Blocks: 338610    

Description Gordon Yorke CLA 2011-06-30 10:30:31 EDT
Support to call SQL functions not part of the JPQL BNF or Criteria API has been proposed for the Specification.

For JPQL the proposed form is " FUNCTION(function_name {, function_arg}*)" and can be used anywhere an expression can be used in a JPQL statement.

For Criteria Queries the method <T> Expression<T> function(String name, Class<T> type,Expression<?>... args); is being proposed for the CriteriaBuilder.
Comment 1 James Sutherland CLA 2012-02-28 11:25:57 EST
Added support for FUNCTION in Hermes.

function() is already supported in Criteria as of JPA 2.0?
Comment 2 James Sutherland CLA 2012-03-01 15:08:13 EST
See patch in bug#305187
Comment 3 Gordon Yorke CLA 2012-03-20 15:10:02 EDT
For Criteria Queries the method <T> Expression<T> function(String name,
Class<T> type,Expression<?>... args); was introduced and supported as part of JPA 2.0
Comment 4 James Sutherland CLA 2012-04-11 10:46:59 EDT
Fixed in 2.4
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:05:03 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink