Core Data troubles - not removing objects
Core Data troubles - not removing objects
- Subject: Core Data troubles - not removing objects
- From: Benjámin Salánki <email@hidden>
- Date: Thu, 1 Nov 2007 10:04:14 +0100
Hi all,
I am pretty lost in the development of my app which uses Core Data and
an SQLiteStore. I hope someone can point me towards the obvious point
I am missing.
Given are two entities with bidirectional 1-to-1 relationships set to
cascade upon deletion. The first entity contains strings and the other
one contains binary data (like images and stuff). I set up two
NSArrayControllers in IB and made the second one contain a set of the
selected item from the first and also set the Deletes objects on
remove checkbox in the Inspector.
My problem is that if I send the remove: or removeObject: message to
the first NSArrayController and then query said item if it is
isDeleted, I get true for the item itself, but false for the item
connected through the relationship. I then manually removed the second
object by sending a removeObject: message to it. Calling isDeleted now
returns true.
All is nice except the SQLiteStore file does not get reduced in size.
I guess that somehow I am doing something wrong and the objects do not
get removed form the object graph at the next save: operation.
Is there anything obviously wrong or missing from my way of handling
this? I could post some code if required.
Thanks,
ben
_______________________________________________
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