• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Core Data Fetch in Different Context
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data Fetch in Different Context


  • Subject: Core Data Fetch in Different Context
  • From: Des Cullen <email@hidden>
  • Date: Tue, 18 Nov 2008 11:19:35 +0000

Hi,

I am trying to prevent duplicates being created in a core data app and am using a fetch to search for duplicates but excluding the managedObject itself. I am using the following predicate;

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(descript = %@) AND (self != %@)", *ioValue, [self objectID]];

This works fine if I use the same context that I loaded the data with but if I use a new context associated with the same model and persistent store it does not. It always returns the originating object as well. The self filter does not seem to work in a new context. I am using a different context since mainly as a look-up context to avoid polluting the main context with look-up data.

What am I missing?

Regards


Des Cullen. _______________________________________________

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


  • Prev by Date: about IMKMouseHandling Protocol in IMKit
  • Next by Date: How to get notification of rerun application
  • Previous by thread: about IMKMouseHandling Protocol in IMKit
  • Next by thread: How to get notification of rerun application
  • Index(es):
    • Date
    • Thread