• 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: -[NSManagedObjectContext save:] fails but gives no NSError
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[NSManagedObjectContext save:] fails but gives no NSError


  • Subject: Re: -[NSManagedObjectContext save:] fails but gives no NSError
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 23 Nov 2007 21:47:41 -0800


On 2007 Nov, 23, at 14:46, mmalc crawford wrote:

Under what circumstances is it not setting an error?

Unfortunately, I can't say for sure, because when it wouldn't tell me what the error was, I took a broad look at what the hell I was doing and realized that my code and data model were maintaining an unnecessary entity. It looked like, prior to the -save:, I could have been either (a) inserting or deleting the same objects twice, or (b) inserting objects with relationships to objects that had been deleted. (Multiple objects had relationships to the same other objects, with Delete Rule = 'Cascade'. Oops.) But once I realized that these other objects were not necessary, I got rid of their entity and all that code, and things have been saving happily ever since.


What I am sure about is that, as per the code in my original post, although I was giving -save: an NSError**, it was returning NO, my store file on the disk was not touched, and the NSError* was nil.

If it ever happens again, I'll test more closely and let you know.
_______________________________________________

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: -[NSManagedObjectContext save:] fails but gives no NSError
      • From: Chris Hanson <email@hidden>
References: 
 >-[NSManagedObjectContext save:] fails but gives no NSError (From: Jerry Krinock <email@hidden>)
 >Re: -[NSManagedObjectContext save:] fails but gives no NSError (From: Jerry Krinock <email@hidden>)
 >Re: -[NSManagedObjectContext save:] fails but gives no NSError (From: mmalc crawford <email@hidden>)

  • Prev by Date: rendering of NSTextFieldCell of NSOutlineView
  • Next by Date: Hi-DPI and bitmaps (was Re: Large progress indicators in Leopard)
  • Previous by thread: Re: -[NSManagedObjectContext save:] fails but gives no NSError
  • Next by thread: Re: -[NSManagedObjectContext save:] fails but gives no NSError
  • Index(es):
    • Date
    • Thread