• 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: a HUGE Core Data bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a HUGE Core Data bug


  • Subject: Re: a HUGE Core Data bug
  • From: email@hidden
  • Date: Fri, 09 Mar 2007 19:52:03 +0100

So in the end it's not a bug but a feature? ;-)

In this case the answer seems to be: Yes! In the ADC-Document "Core Data Programming Guide" you'll find this statement in the section "Relationships":
"... Not modeling a relationship in both directions, however, imposes on you a great number of responsibilities, to ensure the consistency of the object graph, for change tracking, and for undo management. For this reason, the practice is strongly discouraged. It typically only makes sense to model a to-one relationship in one direction."


Does your example probably miss something thats necessary to ensure the models consistency?

Wolfgang


I. Savant schrieb:
Aurélien:

To say, "... but honestly I can't trust Core Data anymore ..." is a bit alarmist, don't you think?

Should this be happening? No, obviously not, but then the documentation does warn that a relationship without an inverse is not recommended* and obeying it seems to fix the problem. I wouldn't call this a bug, I would expect "the unexpected" to happen in some cases by going against the recommendations of the documentation for the technology I'm using.

In your example, you noted that with an inverse relationship, the problem does not exist and that the documentation clearly states relationships without an inverse is not recommended. It's safe to assume this is one of the reasons why. The solution? Add an inverse relationship as recommended by the documentation ... problem solved.

--
I.S.

* Incidentally, that very premise is the basis for many restraining orders in the US, so the Courts apparently agree, but I digress ...




On Mar 9, 2007, at 10:31 AM, Aurélien Hugelé wrote:

Hi list!

I just want to stress Core Data users, since i've discovered what I think is a huge bug, that I reported to apple.
Basically, save an object graph to a SQL store, reload it from disk, the object graph is not restored correctly, some relationships are missing.


You can download a very simple project that demonstrate the bug at http://developer.gumitech.com/CoreDataDramaticalBug.zip
A Readme is included that explains the details.


I'm quite surprised that nobody here has encountered this bug, but honestly I can't trust Core Data anymore, and I fear a customer complain about data loss.

Just an optimist note, the bug can't be reproduced on Mac OS X 10.5... But IMHO Apple must fix it on 10.4 too.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >a HUGE Core Data bug (From: Aurélien Hugelé <email@hidden>)
 >Re: a HUGE Core Data bug (From: "I. Savant" <email@hidden>)

  • Prev by Date: Easy question about URLs
  • Next by Date: Re: Putting a Carbon HIView into a Cocoa NSView
  • Previous by thread: Re: a HUGE Core Data bug
  • Next by thread: Re: a HUGE Core Data bug
  • Index(es):
    • Date
    • Thread