Re: a HUGE Core Data bug
Re: a HUGE Core Data bug
- Subject: Re: a HUGE Core Data bug
- From: Julio Cesar Silva dos Santos <email@hidden>
- Date: Sat, 10 Mar 2007 10:49:31 -0300
If you are using XCode 2.4.1 you will notice that the build process
will warn you that 'Object.linkedObjects -- relationship doesn't have
an inverse'. So if you don't follow the basic rules of a technology
then how can you say that it does not work or it is not trustable?
That would be the same case as if you tried to send an email to
wozni@email@hidden and the server refused the email because it is
malformed. Then where is the problem? the rules of the protocol or
your misunderstanding of its rules?
Julio Cesar Silva dos Santos
email@hidden
Skype: jcssantos01
Blogjective-C
http://www.jcs.santos.nom.br/wp
FetchYourLyrics
http://www.jcs.santos.nom.br/fyl/fyl.html
On 10/03/2007, at 10:08, mmalc crawford wrote:
On Mar 9, 2007, at 7:31 AM, Aurélien Hugelé wrote:
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.
The documentation makes clear that not modeling a relationship in
both directions is strongly discouraged -- you really have to know
what you're doing in order to avoid significant problems.
The issue described in this "bug" will manifest on *any* version of
Mac OS X. It is an incidence of the general issue that to-many
relationships without inverses cannot be used this way.
The model has a ø->> relationship. This means that each object can
have multiple objects in its to-many. It does *not* mean that the
same object can be the destination in multiple different to-many
relationships.
If the project is changed such that object C is not put into both A
and B's relationships (i.e. just leave B with nothing) then it
works correctly. A has 1 object, C and C has 2 objects -- A and B.
So, to summarise, this is *not* a bug in Core Data, huge or
otherwise. It is a case of developer error. This sort of problem
can be avoided by following the guidelines in the documentation.
mmalc
(With thanks to BT.)
_______________________________________________
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