• 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: Chuck Hill <email@hidden>
  • Date: Thu, 5 Jul 2007 10:12:58 -0700


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 one in my editing context.


How could I do that?

I need the object in its globality, so if I can get the object directly and not a dictionary of its values it's better:)

You can answer "bla bla project wonder":) but please point me to the correct method as I didn't find it for now;)

What, exactly, is it that you need? You can't have two different versions of the same EO in the same EOF stack. Avoiding that is one of the central objectives of EOF. Do you need it as an object or just as a dictionary of values. If you need it as an EO, you can't have it. If you need just a dictionary of values, then which dictionary? The values the last time that EOF fetched it from the database (or successfully saved it to the database):


NSDictionary valuesAsLastFetchedFromTheDatabase = eo.editingContext ().committedSnapshotForObject(eo);

If you need a dictionary of the current values in the database, use EOUtilities.qualifierForEnterpriseObject and a fetch spec set for raw rows.

Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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>)

  • Prev by Date: Re: checking webobject's version
  • 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: DirectAction: NSDictionary of the form values
  • Index(es):
    • Date
    • Thread