Not really an answer... For this reason (and others not directly related to Castor), I've decided to _not_ use Long Transactions. Basically, I call commit() after I retrieve each object. From my reading of the Castor JDO docs and some testing, this should "disconnect" the object from the persistence framework.
My code explicitly persists the object at different times using Database.update() followed by a commit(). I haven't run into a problem yet with this approach. --Kevin -----Original Message----- From: Todd V. Jonker [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 3:08 PM To: [EMAIL PROTECTED] Subject: [castor-dev] JDO: Why doesn't recursive update happen automatically? I'm attempting my first use of JDO Long Transactions. I've run into the same problem as everyone else, namely, that you must manually traverse your entire object structure, calling update() on everything, before you update the root. [Gripe: I wasted most of a day discovering this. The LongTransaction doc page makes it look almost trivial, and makes NO mention of this major issue. I also searched the list archive and have yet to find a good, complete example of how to do it properly!] My question is simple: why doesn't Castor do this automatically? I can't imagine a scenario in which you would NOT want this to happen, and Castor already has all the information it needs in order to do it properly. What bugs me is that this is a hugely intrusive design... In order to use long transactions, every persistent class needs to implement TimeStampable. This isn't a big deal, because its very simple and it doesn't tightly couple back to Castor. But now I ALSO have to write graph traversal code that DOES strongly couple back to castor. *** Would someone please explain why update() doesn't do this automatically? *** Would someone please post (or link to) a *complete* example of a complex object web that properly updates? *** Would a committer please add the answers to the documentation? It's clear that many people have burned eons of time trying to get this to work. .T. Todd V. Jonker Inpath Solutions, LLC www.inpathsol.com ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
