[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2564) StatelessSession query uniquing is inconsistent

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Sun Apr 15 08:10:04 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_26719 ] 

Max Rydahl Andersen commented on HHH-2564:
------------------------------------------

assume db with 1doc and 2 chapters
"select d from Document d left join d.chapters c"

returns two different Document instances

"select d from Document d left join fetch d.chapters c"

returns two different Document instances, their chapters point to the same instances, but chapter.getDocument() point to two completelty different proxies

"ss.createQuery( "select d from Document d left join fetch d.chapters c left join fetch c.document"

returns two different Document instances, their chapters point to the same instances, and chapter.getDocument() point to two completelty different proxies which in turn point to the same Document root.






> StatelessSession query uniquing is inconsistent
> -----------------------------------------------
>
>                 Key: HHH-2564
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2564
>             Project: Hibernate3
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.2.3
>            Reporter: Max Rydahl Andersen
>
> StatelessSession uniquing is inconsistent as in sometimes a query will use its temporary persistencecontext (introduced for HHH-1266) to return unique entity instances and in others it wont.
> According to the initial semantics intended (see HHH-742) it should actually do it for each query.
> Main issue is that:
> getEntityUsingInterceptor does not check temp persistencecontext
> internalLoad does not check temp persistencecontext nor create proxies consistent with get()

-- 
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