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

Bug 397858

Summary: Hermes: Incorrect validation of update item when using unqualified path expression
Product: z_Archived Reporter: Pascal Filion <pascal.filion>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Pascal Filion CLA 2013-01-10 08:55:05 EST
Hermes does not correctly validate the path expression of an update item when the entity is not aliased with an identification variable.

JPQL query: UPDATE Employee SET e.name = 'JPQL'
Result: 'e.name' is not found to be invalid.

Internally, Hermes creates a virtual identification variable by using the lower case version of the entity name and qualifies all path expressions, but if a path expression starts with the same string, then validation validates it incorrectly.

JPQL query: UPDATE Employee SET employee.name = 'JPQL'
Result: 'employee.name' is incorrectly seen as being valid.
Comment 1 Pascal Filion CLA 2013-01-10 13:01:14 EST
Fix has been checked into 2.4.x branch and trunk.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:34:27 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink