CORE DATA: timestamping a model object before saving
CORE DATA: timestamping a model object before saving
- Subject: CORE DATA: timestamping a model object before saving
- From: dan pahlajani <email@hidden>
- Date: Wed, 18 Jan 2006 13:29:38 -0800
Hello All,
I am working on a Core Data application and have a question. How can I set
the "modifiedOn" value of a model object just before it is saved?
I have tried to do so in my subclassed model object (NSManagedObject) in
willSave message using setValue:forKeyPath:. But it causes the save process
to fall in an infinite loop.
I am currently setting the modifiedOn value using
setPrimitiveValue:forKeyPath: in the willSave: method. The problem with
using the promitive variant is that the UI is not updated.
Is there a better way to do so. May be something like awakeFromInsert: and
awakeFromfetch: methods.
All the help will be greatly appreciated.
Thanks,
Dan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden