• 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: is fetching safe during validateForInsert:/validateForUpdate?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data: is fetching safe during validateForInsert:/validateForUpdate?


  • Subject: Core Data: is fetching safe during validateForInsert:/validateForUpdate?
  • From: "Sean McBride" <email@hidden>
  • Date: Mon, 23 Mar 2009 16:54:41 -0400
  • Organization: Rogue Research Inc.

Hi all,

Is it OK to perform a fetch during validateForInsert:/
validateForUpdate:?  I have a Core Data entity named 'Person' with an
attribute named 'uniqueNumber'.  I want to ensure that no two People
have the same uniqueNumber.

I have implemented validateForInsert:/validateForUpdate: along these lines:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/
Articles/cdValidation.html#//apple_ref/doc/uid/TP40004807-SW3>

and perform a fetch to see if there are duplicate uniqueNumbers.  It
seems to be working.  But I know fetching is problematic elsewhere, so
thought I'd check.

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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: Re: NSLevelIndicator Bindings Crash
  • Next by Date: NSPredicate with non-string keys
  • Previous by thread: Re: Key path for values in "Shared User Defaults"? [SOLVED]
  • Next by thread: NSPredicate with non-string keys
  • Index(es):
    • Date
    • Thread