Hi, I have a bidirectional one to one relationship between two entities like
this:
Foo - Bar, and Foo has a subclass FooSub. All entities are concrete.
Sometimes when I set the inverse relationship it's like this aBar.toFoo = aFoo,
and this works fine, but when it's linking back to the
If your data store is SQLite, I believe the problem is the subclass FooSub.
Since FooSub is a subclass of Foo, CoreData combines both Foo and FooSub into a
single table whose columns include all properties from Foo AND FooSub.
Consequently, when you create a new instance of Foo, columns from
On Sep 29, 2010, at 06:28, Gideon King wrote:
I would have thought it would be OK for the relationship to point to an
instance of FooSub shouldn't it? After all, it is a subclass of Foo. Or do
things work differently for subclasses in Core Data? If so, how should I work
around this
On 2010 Sep 29, at 09:19, jeremy wrote:
For a solution, rework your schema to subclass FooSub directly from
NSManagedObject.
That might work. If it doesn't,
On Sep 29, 2010, at 9:28 AM, Gideon King wrote:
All entities are concrete … I would have thought it would be OK for the
Thanks but no, it's an atomic store which gets written to XML.
Regards
Gideon
On 30/09/2010, at 2:19 AM, jeremy wrote:
If your data store is SQLite, I believe the problem is the subclass FooSub.
Since FooSub is a subclass of Foo, CoreData combines both Foo and FooSub into
a single table
Sorry, I should have been clearer. It is a sub-entity which is implemented as a
subclass.
Regards
Gideon
On 30/09/2010, at 3:39 AM, Quincey Morris wrote:
On Sep 29, 2010, at 06:28, Gideon King wrote:
I would have thought it would be OK for the relationship to point to an
instance of
Hi Jerry,
Can I just clarify what you mean about working around a bug on 10.5? I do need
this to work on 10.5.
FooSub is a subentity of Foo, and both have their classes defined, with
FooSub's class being a subclass of Foo's class.
Thanks
Gideon
On 30/09/2010, at 3:49 AM, Jerry Krinock
On Sep 29, 2010, at 15:30, Gideon King wrote:
Sorry, I should have been clearer. It is a sub-entity which is implemented as
a subclass.
Hmm. I'd suspect a limitation of delete cascading rules, but that doesn't
really fit with the error message your reported. Was that error text exactly
what
That's actually how I eventually managed to work out that it appeared to be a
subclass/subentity thing. It got picked up on validateForInsert when I was
doing a Save As, and I checked the objects, and they all seemed fine.
But this actually gives me an idea for a bit more testing that I can do
On 2010 Sep 29, at 15:57, Gideon King wrote:
Can I just clarify what you mean about working around a bug on 10.5? I do
need this to work on 10.5.
It was Quincey who tipped me off to this a few weeks ago:
Thanks Jerry, I'll need to keep that in mind.
In the meantime, I've done more research this morning, and it appears that the
underlying issue is that my one to one relationships that have an inverse are
not being maintained properly during a Save As operation, even though at the
managed
11 matches
Mail list logo