Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData: Inverse relationships not maintained (to-one on one size, to-many on the other, with abstract classes)



> 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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: CoreData: Inverse relationships not maintained (to-one on one size, to-many on the other, with abstract classes) (From: Jim Correia <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.