• 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: Migration with abstract entities
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Migration with abstract entities


  • Subject: Re: Migration with abstract entities
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 16 Jan 2009 23:13:11 -0800

On Jan 16, 2009, at 21:00, Sean McBride wrote:

Quincey Morris (email@hidden) on 2009-01-16 6:53 PM said:

The bad news is that abstract entities will cause
NSPersistentDocument's Save As to break, since it apparently uses a
Core Data migration to implement Save As, with an auto-generated
mapping model, which of course fails to copy the inherited
relationships properly. (My solution was to stop using abstract
entities in the next version of the data model. :) )

Do you have any more info on this? In what way does 'save as' break? This sounds like a huge bug. Has it been so since 10.4.0? Is the problem only with relationships from the abstract superentity?

I don't have a lot more info. All my Core Data development has been on Leopard, so I don't know about the Tiger behavior.


By "break" I mean that Save As failed at the end, with a log message. The error message made me think about the abstract entity migration issue, so when I next had a chance I eliminated the abstract entities, and after that Save As worked just fine.

... I just tried modifying the OutlineEdit Core Data sample program to use an abstract entity, and it does *not* fail on Save As.

... And I just tried rebuilding that old version of the app, and it still fails. The log error message is:

The temporary directory at "/private/var/folders/.../TemporaryItems/ (A Document Being Saved By MyApp)" could not be deleted.

In addition, the Save As returns an error which is displayed as a document sheet. It's an array of 46 validation errors. At the time I wrote code to coalesce the error descriptions, so it actually says:

	46 validation errors have occurred:
	1. parent is not valid.
	2. parent is not valid.
	3. listableItems is not valid.
	(43 additional errors not shown)

'parent' and 'listableItems' are properties of the abstract parent entity. I believe I once checked that all of the errors related to the inherited properties. Incidentally, the document wasn't dirty at the time of the Save As, and plain Save always works.


_______________________________________________

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: Migration with abstract entities
      • From: Samuel Strupp <email@hidden>
References: 
 >Migration with abstract entities (From: Samuel Strupp <email@hidden>)
 >Re: Migration with abstract entities (From: Quincey Morris <email@hidden>)
 >Re: Migration with abstract entities (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: ObjC in time-critical parts of the code
  • Next by Date: What does this SystemFlippers message mean
  • Previous by thread: Re: Migration with abstract entities
  • Next by thread: Re: Migration with abstract entities
  • Index(es):
    • Date
    • Thread