I have a factory method getTask(int id), which
retrieves a task (given the id).
And I have another method to update the task
updateTask(Task t).
So what I have done is:
Task t = getTask(1000);
t.setBookedBy("user_x");
updateTask(t);
I don't access the Process object at all.
getTask and updateTask are within separate
transactions. Is it invalid to use the object created
in getTask to call updateTask?thanx --- "Ebersole, Steven" <[EMAIL PROTECTED]> wrote: > What is the psuedo-code steps you are taking when > you want to "update" the > Task? > > Is this in the context of a "long transaction"? Is > the Task new, or > existing? How about the Process? > > > > > > ******************************************** > Steve Ebersole > IT Integration Engineer > Vignette Corporation > 512.741.4195 > > Visit http://www.vignette.com > > ******************************************** > > > -----Original Message----- > From: Manjuka Soysa [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 26, 2002 3:13 AM > To: [EMAIL PROTECTED] > Subject: [castor-dev] Updating an object with a > reference to another > > > Hi, > I have a problem about jdo, and I'd appreciate any > feedback. > I have two classes which use castor jdo for > persistence, Process and Task. > Process has a collection of Tasks, and Task has a > reference to Process, but they are not 'dependent'. > So I can load a Task without loading the Process. > However, when I try to update the Task, I get the > error: > Object, com.wf.WfTask@13bca2, links to another > object, > com.wf.WfProcess@455d1c that is not > loaded/updated/created in this transaction > > How do I get around this? Do I have to update the > task > in the same transaction that loaded it? As I really > want to update only the Task properties, I don't see > why this issue arises. > thanks, > Manjuka > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Sports - Coverage of the 2002 Olympic Games > http://sports.yahoo.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 > __________________________________________________ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
