Re: How to keep creation/modification date of a (Core Data) object?
Re: How to keep creation/modification date of a (Core Data) object?
- Subject: Re: How to keep creation/modification date of a (Core Data) object?
- From: "Philip Q" <email@hidden>
- Date: Sun, 8 Jul 2007 14:44:04 +1200
On 08/07/07, Arthur C. <email@hidden> wrote:
This must be a simple use of setKeys:
triggerChangeNofiticationsForDependentKey, but I can't find the right method
for the key 'modificationDate'...
Creation date is easy, just an awakeFromInsert will do.
But the modification date (obviously) has to change whenever any of the keys
in the object changes. Moreover, it has to keep its value when we are just
asking for the modification date (getter method), and on program
shutdown/restart.
Does it have to update everytime a value is changed, or only when the
object is saved and there are changed values (since those changed may
be reverted)? If so, you can override -willSave and update the
modification date in there.
-Phil
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden