Documentation Archive Developer
Search
PATH  WebObjects 4.0 Documentation > EOControl Reference

 

EOValueMerging


(informal protocol)

Category Of: NSObject

Declared in: EOControl/EOClassDescription.h

Instance Methods

Merging values
- changesFromSnapshot:
- reapplyChangesFromDictionary:


changesFromSnapshot:

- (NSDictionary *)changesFromSnapshot: (NSDictionary *)snapshot

The result is like a snapshot except that it contains only those keys that refer to uncommitted changes in the object relative to the given snapshot. For to-many keys, the uncommitted value is an array of two arrays: uncommitted additions and uncommitted deletions. The return value is autoreleased.


reapplyChangesFromDictionary:

- (void)reapplyChangesFromDictionary: (NSDictionary *)changes

Similar to takeValuesFromDictionary: but the changes dictionary is not quite the same as a snapshot. For to-many relationship keys, the value is an array with exactly two arrays in it: the first is an array of objects to be added to the relation, and the second is an array of objects to be removed from the relation. Attribute and to-one relationship keys refer to values that should replace the current value. An instance of EONull is used in the changes dictionary as a placeholder for nil.



 

Copyright © 1998, Apple Computer, Inc. All rights reserved.