Hello!
I've some problem.
I've 3 entities: BillOfSale, Product, Item.
When I remove an instance of an Item entity I want to decrement total field (attribiute in BillOfSale entity). I wrote a custom class: ItemMO where I increment total fileld using reletionship:
I call this function when I change quantity or product and it's working.
But I don't know what method is called when an instance of an entity is being removed.
In the interface I bind "Delete Item" button to ItemsController (NSArayController for Item entity) remove action.
I'm looking for something like awakeFromInsert method but I can't find it.
Please help me
I've some problem.
I've 3 entities: BillOfSale, Product, Item.
When I remove an instance of an Item entity I want to decrement total field (attribiute in BillOfSale entity). I wrote a custom class: ItemMO where I increment total fileld using reletionship:
Code:
[self setValue: sum forKeyPath:@"billOfSale.total"];
I call this function when I change quantity or product and it's working.
But I don't know what method is called when an instance of an entity is being removed.
In the interface I bind "Delete Item" button to ItemsController (NSArayController for Item entity) remove action.
I'm looking for something like awakeFromInsert method but I can't find it.
Please help me