hello!
i've problem.
i've 3 entities: billofsale, product, item.
when remove instance of item entity want decrement total field (attribiute in billofsale entity). wrote custom class: itemmo increment total fileld using reletionship:
code:
[self setvalue: sum forkeypath:@"billofsale.total"];
i call function when change quantity or product , it's working.
don't know method called when instance of entity being removed.
in interface bind "delete item" button itemscontroller (nsaraycontroller item entity) remove action.
i'm looking awakefrominsert method can't find it.
please me
i assume object removed in ui, create custom remove method checked sum value manually. i'd call method instead of remove on nsarraycontroller.
you'll have remove object manually nsmanagedobjectcontext using [context deleteobject:obj]; obj object in question.
Forums Macs Mac Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
Comments
Post a Comment