autoSave delegate call?

18 views
Skip to first unread message

Todd Freese

unread,
May 7, 2014, 2:44:41 PM5/7/14
to mobile-c...@googlegroups.com
I would like to start using the autoSave feature on CBLModel classes. Is there a willSave delegate call to run some code before the save?

All of my model classes have an updated timestamp field that needs to get updated at save time. It would be great to have this done in the class file and not in a ton of different places.

Thanks,

Todd

Jens Alfke

unread,
May 7, 2014, 3:06:25 PM5/7/14
to mobile-c...@googlegroups.com

On May 7, 2014, at 11:44 AM, Todd Freese <to...@filmworkers.com> wrote:

I would like to start using the autoSave feature on CBLModel classes. Is there a willSave delegate call to run some code before the save?

/** Called while saving a document, before building the new revision's dictionary.
    This method can modify property values if it wants to. */
- (void) willSave: (NSSet*)changedPropertyNames;

Todd Freese

unread,
May 7, 2014, 4:35:47 PM5/7/14
to mobile-c...@googlegroups.com
Awesome.. Thanks… sorry must have missed that one in the headers…

Todd
Reply all
Reply to author
Forward
0 new messages