objective c - Core Data before Update callback -


i have entities have createdat , updatedat properties. trying set value of attributes automatically upon insert/update.

after doing research, found out there awakefrominsert method use set value of createdat property automatically when new object created.

however, not find similar updating object. should do? have update updatedat property manually every time?

it depends want achieve. updating on save at:

-(void)willsave;

remember modifying properties @ place call willsave again. so, have update updatedat once. also, have check object wasn’t deleted - isdeleted.

you may observe properties , set updatedat date when updated, not saved.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -