Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349646 - CriteriaQueryImpl should hold parameters in LinkedHashSet
Summary: CriteriaQueryImpl should hold parameters in LinkedHashSet
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-17 02:24 EDT by Oliver Drotbohm CLA
Modified: 2022-06-09 10:10 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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