CoreData MultiThreading Delete

Discussion in 'iOS Programming' started by ashwinr87, Oct 6, 2011.

  1. ashwinr87 macrumors member

    Mar 9, 2011
    In my iPAD application, I am using Multithreading to read data from my database and hence I am using different manged object contexts as explained Fred McCann's blog

    The problem I am facing is while deleting items from the database. When I try to delete, I get the error that the managedObjectContext cannot delete another objectContext's data. How do I solve this problem?

    It would be great is someone could help me out with this.
  2. jiminaus macrumors 65816


    Dec 16, 2010
    An NSManagedObject is bound to the NSMangedObjectContext from which it came. Any time you manipulate or access a managed object, you use the associated managed object context.

    If you haven't already, you might want to read the Concurrency with Core Data chapter of the Core Data Programming Guide.

Share This Page