DataContextPrefetchTst.testPrefetch9() test case
demonstrates a condition for failing prefetch query:
query with that has a prefetch destination entity as a
part of its qualifier.
There are 2 sub-cases:
1. When such prefetch makes little sense (we match on a
to-one object that is already known)
2. When such prefetch makes sense, e.g. when the
qualifier is NOT EQUAL, or when matching on a to-many.
I guess the right thing would be still to do the
prefetch, using an inner join back to the original
entity (thus eliminating prefetched rows that have no
relationship with root entity).
Even in case (1) prefetch may have some value -
refreshing cached object with database data
|Field||Original Value||New Value|
|Priority||Major [ 3 ]||Minor [ 4 ]|
|Fix Version/s||1.0 [STABLE] [ 10000 ]|
|Status||Assigned [ 2 ]||Closed [ 6 ]|
|Resolution||Fixed [ 1 ]|
|Project Import||Sat Mar 21 00:51:04 PDT 2009 [ 1237621864637 ]|
|Workflow||jira [ 12456230 ]||Cayenne workflow [ 12486657 ]|