• 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
Validating a new entity in one-to-many relationships in Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Validating a new entity in one-to-many relationships in Core Data


  • Subject: Validating a new entity in one-to-many relationships in Core Data
  • From: The Karl Adam <email@hidden>
  • Date: Tue, 9 Aug 2005 10:10:32 -0400

For normal attributes and one-to-one relationships you get a
-validate<<Key>>:error: when you ask CoreData for the implementations
of the accessors, however on a one-to-many relationship you only
-add<<Key>>sObject: and -remove<<Key>>sObject:. The problem is that I
want to validate newly added Objects but there doesn't seem to be a
way to do so.

I want to not allow entities that match certain conditions to be
related to my Entity but I don't want it to fail silently which I
could do by just doing nothing in the above methods when those
conditions are met. If I use a validate<<Key>>:error: method then I
would have to test each related entity unnecessarily wasting time. Is
there a proper way to validate a newly added value to a one-to-many
relationship, preferably one that allows an NSError to be sent back
with the reason/conditions that made the relationship unacceptable?

-Karl
 _______________________________________________
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:
    • Validating a new entity in one-to-many relationships in Core Data
      • From: The Karl Adam <email@hidden>
  • Prev by Date: WebKit plug-ins
  • Next by Date: How do enforce a scrollPageDown on a view?
  • Previous by thread: WebKit plug-ins
  • Next by thread: Validating a new entity in one-to-many relationships in Core Data
  • Index(es):
    • Date
    • Thread