I think you can setAutoStore( true ) before you start the transaction, and Castor will transverse the tree for you.
There are bugs reported about that setAutoStore( true ) doesn't work. However, for each report that I actually looked deep into it, it turned out to be some other problem, like user didn't use bi-directional relationship, didn't set the back reference etc. There are no confirmed case found that proved long transaction it is broken, recently. Except that when it is used with jBoss. But, I have really no idea why it is happening. Because I don't know about the jBoss internal. And, all known bugs about long transaction confirmed earlier have been fixed, as far as I know. Also, existing test cases are showing that it is working. If you are sure that it is otherwise, please send us a test case diff, which based on existing test. The reality is if you send us something else, or bare description, I am not going to have time to take a look at it. Or maybe only 1 or 2 cases in 3 months. It might be 2% of totally Castor JDO questions to the mailing list. Be realistic! Everybody is as busy, if you don't send us "the problem" in a format we need, you know what will happen. Don't complain about it. Thomas -----Original Message----- >From: Todd V. Jonker [mailto:[EMAIL PROTECTED]] >Sent: Thursday, February 14, 2002 12: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
