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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to