getting the database values of an object without changing the one in the current editing context

2007-07-05 Thread WO Dev
Hi, I'm not sure my subject is understandable, anyway. Assuming I have an object x, I'm manipulating it in an editing context. At a certain point I need to get the original object (the one from the database) but without changing anything to the one in my editing context. How could I do

Re: getting the database values of an object without changing the one in the current editing context

2007-07-05 Thread Cyryl Plotnicki-Chudyk
WO Dev wrote: Hi, I'm not sure my subject is understandable, anyway. Assuming I have an object x, I'm manipulating it in an editing context. At a certain point I need to get the original object (the one from the database) but without changing anything to the one in my editing context. How

Re: getting the database values of an object without changing the one in the current editing context

2007-07-05 Thread Alexander Spohr
Xavier, maybe you should use a second EOEditingContext to fetch that „original“? Or you migrate to a second edcon before you start to modify? atze Am 05.07.2007 um 12:28 schrieb WO Dev: Hi, I'm not sure my subject is understandable, anyway. Assuming I have an object x, I'm

Re: getting the database values of an object without changing the one in the current editing context

2007-07-05 Thread Ken Anderson
Xavier, EOF does this exact thing when it's deciding what has changed in your object, and what updates it needs to perform. It does this by using the snapshot, which is how I'd recommend you doing this as well. It would help if you clued us in to *why* you need it - so that answers

Re: getting the database values of an object without changing the one in the current editing context

2007-07-05 Thread WO Dev
Thanks Cyryl, Well I was hoping not to have to deal with I have to store the object somewhere before even knowing I might need it's previous state later;) Xavier WO Dev wrote: Hi, I'm not sure my subject is understandable, anyway. Assuming I have an object x, I'm manipulating it in an

Re: getting the database values of an object without changing the one in the current editing context

2007-07-05 Thread WO Dev
Hello Atze:), I could do that. Am I going to have issues if I try to create a local instance in my current editing context? I'll try that, thanks Xavier Xavier, maybe you should use a second EOEditingContext to fetch that „original“? Or you migrate to a second edcon before you start

Re: getting the database values of an object without changing the one in the current editing context

2007-07-05 Thread Chuck Hill
On Jul 5, 2007, at 3:28 AM, WO Dev wrote: Hi, I'm not sure my subject is understandable, anyway. Assuming I have an object x, I'm manipulating it in an editing context. At a certain point I need to get the original object (the one from the database) but without changing anything to the

Re: getting the database values of an object without changing the one in the current editing context

2007-07-05 Thread WO Dev
Hello Ken, Xavier, EOF does this exact thing when it's deciding what has changed in your object, and what updates it needs to perform. It does this by using the snapshot, which is how I'd recommend you doing this as well. It would help if you clued us in to *why* you need it - so that