[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2277) bidirectional <key-many-to-one> both lazy=false fetch=join lead to infinite loop

Steve Ebersole (JIRA) noreply at atlassian.com
Tue May 18 20:10:11 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=37209#action_37209 ] 

Steve Ebersole commented on HHH-2277:
-------------------------------------

{quote}
Really what needs to happen here specifically is that Customer needs to be at least in a state where it has been added to the PersistenceContext in LOADING state prior to processing Order or its key
{quote}
I had considered adding a LOADING entry to PersistenceContext as soon as we read the key from the result set.  In theory this would allow seeing the loading entity entry right away.  The issue there is that the result set might not contain the entity and it might be lazy, which would mean that it would not "end loading" during this load and we would have a bogus entity entry now as part of the PersistenceContext.

I am just completely unsure of all the ramifications.  This "loading" process has pretty serious leakage of concern.  This situation is, imo, an issue with storing process-specific (loading) state in the context of a larger process (session).  The longer term solution I think is to finally complete the notion of LoadContexts such that we don't have to store stuff into PersistenceContext until we are done loading.  This would allow registration of the fact that we have encountered certain entity keys within a "load context", a fact we could use later well reading the composite keys.  And not the LoadContexts as they are (they were hacked in ways to fit with Loader); I mean the notion of LoadContexts as originally envisioned.  Perhaps ResultSetProcessor is a better term for this?

Also, in terms of making this "order aware", is simply reversing the order in which we process entity peristers while reading keys enough?

(sorry for the monologuing, just trying to keep track of my investigations and findings...)

> bidirectional <key-many-to-one> both lazy=false fetch=join lead to infinite loop
> --------------------------------------------------------------------------------
>
>                 Key: HHH-2277
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2277
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.1
>            Reporter: Emmanuel Bernard
>            Assignee: Steve Ebersole
>             Fix For: cfg-rework
>
>


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