Re: CoreData: Inverse relationships not maintained (to-one on one size, to-many on the other, with abstract classes)
Re: CoreData: Inverse relationships not maintained (to-one on one size, to-many on the other, with abstract classes)
- Subject: Re: CoreData: Inverse relationships not maintained (to-one on one size, to-many on the other, with abstract classes)
- From: John Timmer <email@hidden>
- Date: Tue, 31 May 2005 17:53:43 -0400
> On May 31, 2005, at 3:15 PM, Jim Correia wrote:
>
>> I have a data model with abstract entities in the hierarchy. The
>> Item object knows about its root container (to one relationship),
>> and the container object knows about its items (too many
>> relationship.)
>>
>> If I manually set the value for one side of the relationship, the
>> other side isn't maintained automatically. I've built a fictitious
>> app which demonstrates the problem.
I took a quick look over your project, and I see what you're running into.
I'm curious about three things, which you might want to check into before
filing a bug so you can tell how specific the problem is:
1. if you flatten the class hierarchy, so that there's no inheritance, do
the relationships get managed for you?
2. if you make the superclass concrete instead of abstract, are the
relationships managed?
3. if you create files for the class, so that you have actual add and
delete methods for the set items (instead of mutableSetValueForKey:) does
this make a difference?
I've got a class structure that has some similarity to yours, but I wound up
doing the relationship maintenance manually because things wound up too
complicated otherwise. I'm wondering if I dodged a bullet by doing that.
Cheers,
JT
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden