• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: getting the database values of an object without changing the one in the current editing context
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Re: getting the database values of an object without changing the one in the current editing context
  • From: Guido Neitzer <email@hidden>
  • Date: Thu, 5 Jul 2007 13:56:58 -0600

On 05.07.2007, at 13:46, WO Dev wrote:

Actually I need it to save the previous object as a string (in fact an xml representation).
So my process is to manipulate an object, and when I submit the changes, just before saveChanges, I'm tracking who did this, when, and the xml representation.


That's why I'd like to get the database "state" of the object when I do te tracking part.

You can use "snapshot()" to get the state, for which EOF thinks it is the current database state. If some other application changed it, this might be different from the actual values in the database.


You could also use a raw sql query to get the current content from the database.

I use "changesFromSnapshot" to collect only changes to the objects. My eo superclass does all that for me and creates a dictionary of changes when the object is saved.

cug
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >getting the database values of an object without changing the one in the current editing context (From: WO Dev <email@hidden>)
 >Re: getting the database values of an object without changing the one in the current editing context (From: Ken Anderson <email@hidden>)
 >Re: getting the database values of an object without changing the one in the current editing context (From: WO Dev <email@hidden>)

  • Prev by Date: Re: getting the database values of an object without changing the one in the current editing context
  • Next by Date: Re: WOBuilder Replacement
  • Previous by thread: Re: getting the database values of an object without changing the one in the current editing context
  • Next by thread: Re: getting the database values of an object without changing the one in the current editing context
  • Index(es):
    • Date
    • Thread