[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5295) Rendered JPAQL query shall be the same all the times, aliases shall not have random indexes
Sergey Vladimirov (JIRA)
noreply at atlassian.com
Sat Jun 5 10:16:37 EDT 2010
Rendered JPAQL query shall be the same all the times, aliases shall not have random indexes
-------------------------------------------------------------------------------------------
Key: HHH-5295
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5295
Project: Hibernate Core
Issue Type: Improvement
Components: entity-manager
Affects Versions: 3.5.0-Final
Reporter: Sergey Vladimirov
Priority: Trivial
Each time JPAQL query is rendered from CriteriaQuery it has new aliases for table aliases. It should be the same for same CriteriaQuery (or CriteriaQueries that builded in the same way) all the times.
Reason: QueryStructure uses HashSet to store roots.
Solution: replace HashSet with LinkedHashSet:
from
private Set<Root<?>> roots = new HashSet<Root<?>>();
to
private Set<Root<?>> roots = new LinkedHashSet<Root<?>>();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list