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

Bug 320446

Summary: Query.HINT dot notation to access nested attributes not working
Product: z_Archived Reporter: corteggiano
Component: EclipselinkAssignee: Project Inbox <eclipselink.orm-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P2 CC: tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description corteggiano CLA 2010-07-20 17:21:03 EDT
Build Identifier: 7608

org.eclipse.persistence.internal.jpa.QueryHintsHandler, function
QueryHintsHandler$BatchHint.applyToDatabaseQuery(Object, DatabaseQuery, ClassLoader, AbstractSession), lines 1192 to 1205.
While loop iterates over the dot expressions but the line:
DatabaseMapping mapping = descriptor.getObjectBuilder().getMa....
always asks jectfor the mapping ob to the same descriptor (descriptor never changes inside the loop), so second iteration returns null throwing an exception. Previous versions of eclipselink don't have this bug.


Reproducible: Always

Steps to Reproduce:
String  qs = "SELECT e FROM Car e ";
Query q = em.createQuery(qs);
q.setHint(QueryHints.BATCH, "e.engine.brand");
Comment 1 Tom Ware CLA 2010-08-09 13:56:31 EDT
Setting target and priority.  See the following page for details of the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 2 Tom Ware CLA 2010-09-27 10:34:15 EDT
Setting as dup of 320254 because that bug has the contributed patch for this issue.

*** This bug has been marked as a duplicate of bug 320254 ***
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:04:15 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:07:25 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink