Patrick van Kann wrote: >> Are you saying that by making the relationship bi-directional Castor >> will then accept that the B objects are within the current transaction >> context? >> >> > No, I was merely observing that in order for Castor to work it is > required that relationships are bi-directional, and in the code > fragment it appeared that they were not, as the field mapping occured > only in the A class.
Hmm... Actually, it works just fine without it being bi-directional. Like I said, once I performed all my operations with objects that were loaded from the same transaction, everything persists properly. >> On a related note, I can imagine many situations where all I really want >> is a Collection of related id's from the bridging table, rather than the >> objects themselves. So in the case of: >> > This functionality is present in Castor. Read > http://www.castor.org/castor-one.html#Lazy-Loading. > Note that you need to change your persistent classes to uses a > RelationCollection - this will hold only the ids of the related > objects until you try and access that object using say, > iterator.next(), whereupon it will load the entire object. I know about lazy loading, but was not aware about the RelationCollection (since I haven't tried it out yet). When using RelationCollection, can I just pull the keys? I'm developing a webapp, and often times I just need the id to create a link, without necessarily pulling up any info. Don't have the source in front of me a.t.m. I'll look into it tomorrow, but I suspect this wouldn't be exposed. Thanks, -Mark ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
