Prefetching flattened relationships: Possible WONDER or WO5.4.3 problem (exception)
Prefetching flattened relationships: Possible WONDER or WO5.4.3 problem (exception)
- Subject: Prefetching flattened relationships: Possible WONDER or WO5.4.3 problem (exception)
- From: Sergio Sánchez Maffet <email@hidden>
- Date: Tue, 23 Sep 2008 20:24:46 +0200
Hi all,
I have noticed a failure in the handling of prefetched flattened
relationships using WONDER (latest) with WO 5.4.3
Model:
My1Entity (class My1Entity)
To one relationships: my3entity destination My3Entity
To many relationships: my2entities (flattened relationship)
destination My2Entity
My2Entity (class My2Entity)
To many relationships: my1entities (flattened relationship)
destination My1Entity
MyJoinEntity (EOGenericRecord, not visible)
To one relationships: my1Entity destination My1Entity, my2Entity
destination My2Entity
My3Entity (class My3Entity)
To many relationships: my1entities destination My1Entity
Now I want to fetch My1Entity objects, with the following qualifier:
"my3entity = %@", new NSArray<My3Entity>(a3EntityObject)
If you fetch now, there is no problem.
But if you set to prefetch my2entities (!) of My1Entity with
setPrefetchingRelationshipKeyPaths(new NSArray<String>("my2entities"))
you got an exception like this one:
java.lang.IllegalStateException: sqlStringForKeyValueQualifier:
attempt to generate SQL for
com.webobjects.eocontrol.EOKeyValueQualifier (my1Entity. my3entity =
(MyEO2)'...') failed because attribute identified by key 'my1Entity.
my3entity' was not reachable from from entity 'MyJoinEntity'
This completely is weird, my1Entity. my3entity is reachable from
MyJoinEntity (EOGenericRecord),
but the attribute identified by key 'my1Entity. my3entity' is not an
attribute/key but a key path!
Until now, I have not done any further investigations... it was
working without WONDER and WO 5.4.2 and .3
Is it obligatory to use ERXGenericRecord?
Any clues?
Kind regards,
Sergio
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden