I have object1 which have collection of object2 which have association with object3.
I add new object2 with transient instance of object3 into object1 collection. Then I save object1. It cascades save to object2. Then I need to reread the object1 state from the database. So I call session.get(Object1.class, object1.getId()); returned object contains newly added object2 in the collection and that object2 has original transient object3, which is not associated with the current session. So I get LazyInitializationException...
I think that session have to check if all returned objects are associated with current session.
hibernete 3.1.3, 3.1.2
If this is still an issue on ORM 4.2 or 4.3, anyone have a test case to attach?
Note: In an attempt to clean up the HHH JIRA, we will be rejecting any ticket that sits in the "Awaiting Test Case" state for 2-3 months with no response. So, if this issue is critical to you, please attach a reproducing test case ASAP. Thanks!
Bulk rejecting issues lacking a test case or recent response.