• 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: Core Data: Error while saving. Multiple validation errors occurred.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data: Error while saving. Multiple validation errors occurred.


  • Subject: Re: Core Data: Error while saving. Multiple validation errors occurred.
  • From: Nick Zitzmann <email@hidden>
  • Date: Tue, 14 Dec 2010 16:22:01 -0700

On Dec 14, 2010, at 4:18 PM, Ayers, Joseph wrote:

> When I log Userinfo from the save operation,
>    NSError *error = nil;						//Now try saving the data
>    if (![[self managedObjectContext] save: &error]) {
>   NSLog(@"Unresolved error %@, %@", error, [error userInfo]);

That's not really necessary. Just break on the error in the debugger and type "po [error userInfo]" to print the results of sending the -userInfo message to the error.

> I get:
> 2010-12-14 17:40:19.829 Roboplasm[23542:903] Unresolved error Error Domain=NSCocoaErrorDomain Code=1560 UserInfo=0x43f870 "Multiple validation errors occurred.", {
>    NSDetailedErrors =     (
>        Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43ec90 "TapeDate is a required value.",
>        Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43f2e0 "ClipDate is a required value.",
>        Error Domain=NSCocoaErrorDomain Code=1570 UserInfo=0x43f830 "TableDate is a required value."
>    );
> }
>
> Indeed, these are the attributes that I added to the entities that are specified with type "date". I'm at a loss for how to rectify this.

That means that you added three keys to the model _and_ marked them as required, and then the application failed to fill each of those keys with a value prior to saving. Either you need to make the app fill those keys with values, or you need to re-evaluate whether or not those keys should be required to be filled & change the model accordingly.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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

  • Follow-Ups:
    • Re: Core Data: Error while saving. Multiple validation errors occurred. SOLVED
      • From: "Ayers, Joseph" <email@hidden>
References: 
 >Core Data: Error while saving. Multiple validation errors occurred. (From: "Ayers, Joseph" <email@hidden>)
 >Re: Core Data: Error while saving. Multiple validation errors occurred. (From: Nick Zitzmann <email@hidden>)
 >Re: Core Data: Error while saving. Multiple validation errors occurred. (From: "Ayers, Joseph" <email@hidden>)

  • Prev by Date: Re: Core Data: Error while saving. Multiple validation errors occurred.
  • Next by Date: Re: Core Data: Error while saving. Multiple validation errors occurred. SOLVED
  • Previous by thread: Re: Core Data: Error while saving. Multiple validation errors occurred.
  • Next by thread: Re: Core Data: Error while saving. Multiple validation errors occurred. SOLVED
  • Index(es):
    • Date
    • Thread