Thank you. I supposed, from a performance perspective, if the relationship is ternary, I should have a convenience method that does the setA(A) and A.getBs().add(B) and then I can turn it off to stop the SQL from being executed. Correct?
On Thu, 2003-10-23 at 00:32, Charles Anthony wrote: > Hi, > It is indeed to do with caching. > > Let us have a one-to-many relation : A has many Bs. > We modify A (but leave it's related B's alone), and A remains in the cache. > We then create a B, and associate it with A (e.g. b.setA(A) ) - but we > *don't* add it to A's collection of B's. > If we then retrieve A from the Cache as a result of another query. > If refresh = false, then the collection of B's will *not* contain our new B. > If refresh = true, the the collecton will contain the new B - in other words > the collection is refreshed when the object is retrieved from the cache. > > The use of CollectionProxies prevents the actual materialization of all > object in colleciton until needed i.e. the full query is not actually > executed until the contents of the collection is accessed. > > Cheers, > > Charles. > > > -----Original Message----- > > From: Andy Czerwonka [mailto:[EMAIL PROTECTED] > > Sent: 22 October 2003 23:53 > > To: OJB Users List > > Subject: refresh=true OR refresh=false > > > > > > In looking at the documentation, there isn't really anything > > descriptive > > regarding this attribute on collections/references. I'd like > > to turn it > > off, but I'm afraid. Should I be? Can someone help me > > understand this > > a little better so that I know what's going on? Is this a > > cache thing? > > > > -andy > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > This email and any attachments are strictly confidential and are intended > solely for the addressee. If you are not the intended recipient you must > not disclose, forward, copy or take any action in reliance on this message > or its attachments. If you have received this email in error please notify > the sender as soon as possible and delete it from your computer systems. > Any views or opinions presented are solely those of the author and do not > necessarily reflect those of HPD Software Limited or its affiliates. > > At present the integrity of email across the internet cannot be guaranteed > and messages sent via this medium are potentially at risk. All liability > is excluded to the extent permitted by law for any claims arising as a re- > sult of the use of this medium to transmit information by or to > HPD Software Limited or its affiliates. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
