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

Bug 349646

Summary: CriteriaQueryImpl should hold parameters in LinkedHashSet
Product: z_Archived Reporter: Oliver Drotbohm <odrotbohm>
Component: EclipselinkAssignee: Project Inbox <eclipselink.orm-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P2 CC: tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Oliver Drotbohm CLA 2011-06-17 02:24:54 EDT
Build Identifier: 

When building CriteriaQueries using ParameterExpressions without a name (e.g. cb.getParameter(String.class)) on cannot access the parameters to be bound from the CriteriaQuery later on in a reliable order. I'd like to do the following:
Iterator<Object> values = …;
for (ParameterExpression expression : criteriaQuery.getParameters()) {
  query.setParameter(expression, values.next());
}

This works for all other JPA providers as they hold the parameters in a LinkedHashSet. I know this is rather a black spot in the spec as it shouldn't have defined getParameters() to return a String. I'll report this to the expert group and will see what can be done…

Reproducible: Always
Comment 1 Tom Ware CLA 2011-06-30 15:13:08 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:10:24 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink