> On 2015 Feb 13, at 11:27, Steve Mills <sjmi...@mac.com> wrote:
> 
> Is there a better strategy for deleting empty container entities? At first I 
> tried setting the Asset's folder relationship to Cascade, but that threw up 
> all over.

Apparently the “count is never 1” because Core Data does not delete your Folder 
until the end of the run loop cycle.

A different approach would be maybe to register for 
NSObjectsChangedInManagingContextNotification.  Another alternative would be to 
use the Cascade Delete, and I’m not sure if you’ve done that because I didn’t 
scrutinize all the details in your post.  But that may not work as expected, as 
I learned in 2009…

http://lists.apple.com/archives/cocoa-dev/2009/Jun/msg01334.html

A shortcut I’ve learned is: Don't overthink Core Data.  If something doesn’t 
work as expected, accept it and try something different.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to