Hi. Nope. I've not looked into using proxies yet (will do). I'm just using the persistent objects themselves in a very short lived Session.
Rgds, Graeme. -----Original Message----- From: Schnitzer, Jeff [mailto:[EMAIL PROTECTED] Sent: Monday, August 25, 2003 3:26 PM To: Graeme Knight; [EMAIL PROTECTED] Subject: RE: [Hibernate] Lazy Loading, upwards? Do you have a proxy defined for the parent object? Jeff Schnitzer [EMAIL PROTECTED] > -----Original Message----- > From: Graeme Knight [mailto:[EMAIL PROTECTED] > Sent: Monday, August 25, 2003 11:42 AM > To: [EMAIL PROTECTED] > Subject: [Hibernate] Lazy Loading, upwards? > > Hello. > > I have checked the FAQs and docs on this, but have not come to a > conclusion, so perhaps someone can suggest something: > > I am representing a tree structure using Hibernate persistent objects. > Each node in the tree can represent another node or a leaf. The children > of a node are stored using one-to-many/many-to-one child-parent > relationship with inverse="true" as suggested in the docs. I have > lazy="true" on the Set of children as I want to exhibit lazy loading. > > Here's my problem (I'll try without code snippits first): > > I have two objects A and B, and I really want to load them independently > through the Session. Loading them independently is okay if there is no > relationship between the two. However, if there is a parent-child > relationship between the two and I load the child, then it appears that > the parent is loaded automatically (I know this because when I load the > parent I get the exception telling me an object of that id already > exists). > > Is there any way to make the parent part of the relationship exhibit > 'lazy' loading so I can load both objects independently even if there is a > parent-child relationship? I thought perhaps outer-join="false" on the > many-to-one end might cure the problem, but alas seems not unless I got it > wrong. > > Many thanks for any help, Rgds, Graeme. > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines > at the same time. Free trial click > here:http://www.vmware.com/wl/offer/358/0 > _______________________________________________ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
