• 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
Re: Bindings / Core Data: Ensuring a value is unique
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings / Core Data: Ensuring a value is unique


  • Subject: Re: Bindings / Core Data: Ensuring a value is unique
  • From: "I. Savant" <email@hidden>
  • Date: Thu, 14 Sep 2006 08:50:35 -0400


You'll want to look into Core Data's validation machinery:

http://developer.apple.com/documentation/Cocoa/Conceptual/ ModelObjects/Articles/moValidation.html

Though I haven't done what you're looking for specifically, I'd probably try fetching any matches within the validation code and denying the change if any are found.

--
I.S.


On Sep 14, 2006, at 6:25 AM, Chris Blunt wrote:

Hi,

Could anyone let me know if there is an elegant way to ensure when a value is assigned to an NSManagedObject, that value is unique? Is there a method to ensure that entries are unique, or should my controller manually check? If this is the case, where should I put this check code to allow the controller to 'deny' the change?

I'm trying to learn the most elegant, 'Cocoa-friendly' solutions to my problems, and can't find an answer to this one! Appreciate any help or pointers in the right direction!

Thanks,
Chris
--
www.chrisblunt.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Bindings / Core Data: Ensuring a value is unique
      • From: Chris Blunt <email@hidden>
References: 
 >Bindings / Core Data: Ensuring a value is unique (From: Chris Blunt <email@hidden>)

  • Prev by Date: Re: Dialog problem [SOLVED]
  • Next by Date: Re: String in NSRect
  • Previous by thread: Bindings / Core Data: Ensuring a value is unique
  • Next by thread: Re: Bindings / Core Data: Ensuring a value is unique
  • Index(es):
    • Date
    • Thread