I created new version of CoreData model (added one new attribute to entity) and mapping from one to another. Then I open document created with old model. It opens normally but when I tried to save it I get alert window with “The document “Blahblahblah” could not be saved as “Blahblahblah.blah”. An error occurred while saving.” and message in debug console
AppKit called rmdir("/private/var/folders/v9/y2tl4yh55zj1pcg0typksyrm0000gp/T/TemporaryItems/(A Document Being Saved By Document 3)"), it didn't return 0, and errno was set to 66.
Have you got ideas what is it meen?
PS. It is not my first experience in CoreData migration but it’s first time I stuck so hard.
Your mileage may vary, but when I had this issue, it turned out to be a validation error.
My use case was an autosave (i.e. I hadn’t explicitly called save). I verified this by explicitly putting a save call in and dumping the resultant error:
Turns out (in my case), I had a required entity that wasn’t being set.
Good luck.