I'm using a NSManaged object subclass that was generated by the core data GUI tool in XCode.
NSLog'ing the object reveals that it's properly instantiated and holding values... But if I try to use something like this:
[generatedSubClass committedValuesForKeys:nil]
I get back an empty dictionary.
The docs state that committedValuesForKeys
Returns a dictionary of the last fetched or saved values of the receiver for the properties specified by the given keys.
It follows that the object you are messaging is not the last fetched or saved.
Also, note that committedValuesForKeys is an instance method, not a class method.
Thus, not [managedObjectSubclass committedValuesForKeys:nil]
but [aManagedObject committedValuesForKeys:nil]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With