[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-5295) Rendered JPAQL query shall be the same all the times, aliases shall not have random indexes

Steve Ebersole (JIRA) noreply at atlassian.com
Fri Jul 23 13:16:35 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-5295.
-------------------------------

    Resolution: Fixed

> 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
>            Assignee: Steve Ebersole
>            Priority: Trivial
>             Fix For: 3.5.5, 3.6.0.Beta2
>
>   Original Estimate: 1h
>          Time Spent: 13m
>  Remaining Estimate: 47m
>
> 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