Problem with WODisplayGroup and prefetching
Problem with WODisplayGroup and prefetching
- Subject: Problem with WODisplayGroup and prefetching
- From: Alex Johnson <email@hidden>
- Date: Mon, 11 Jul 2005 18:26:55 -0500
Hi --
This is a rather complicated problem, so I'm hoping that it rings a bell with someone who's run into it before. I realize this is a long message, so thanks in advance to those of you that reach the end.
I'm having an issue with my WODisplayGroup not prefetching properly.
Setting: WO 5.2.x / Mac OS 10.3.x -- Using the session's default editing context, with its
shared editing context set to null, from a freshly started app.
My data model is like this:
<x-tad-bigger> Survey.product --> Product
Survey.address --> Address
Survey.</x-tad-bigger><x-tad-bigger>questionResponses</x-tad-bigger><x-tad-bigger> <-->> QuestionResponse.survey
</x-tad-bigger>
My fetch spec for surveys has these prefetch keys:
<x-tad-bigger> "questionResponses",
"address"
</x-tad-bigger>
My WOO file sets up the WODisplayGroup with that fetch spec. When it fetches from the database, I see the prefetch SQL:
<x-tad-bigger> [2005-07-11 17:55:12 CDT] <WorkerThread10> === Begin Internal Transaction
[2005-07-11 17:55:12 CDT] <WorkerThread10> evaluateExpression: <com.webobjects.jdbcadaptor.FrontbasePlugIn$FrontbaseExpression: "SELECT DISTINCT t0."city", ..., t0."zipcode" FROM "ADDRESS" t0, "survey" T1, "product" T2 WHERE T2."REL_DATE" >= TIMESTAMP '2005-01-11 00:00:00.000' AND t0."oid" = T1."oid_addr" AND T1."oid_product" = T2."OID"">
[2005-07-11 17:55:12 CDT] <WorkerThread10> 343 row(s) processed
[2005-07-11 17:55:12 CDT] <WorkerThread10> === Commit Internal Transaction
</x-tad-bigger>
This is correct. I'm expecting 343 addresses, and when I execute that SQL manually I get the correct result set. However, if I print out one of my survey objects I see:
<x-tad-bigger> ...
values = {
...
address = "<Address fd17d1 (com.webobjects.eoaccess.EOAccessFaultHandler _EOIntegralKeyGlobalID[Address (java.lang.Integer)1000001])>";
...
questionResponses = ("<</x-tad-bigger><x-tad-bigger>QuestionResponse</x-tad-bigger><x-tad-bigger> e36a63 _EOIntegralKeyGlobalID[</x-tad-bigger><x-tad-bigger>QuestionResponse</x-tad-bigger><x-tad-bigger> (java.lang.Integer)1000032]>", ... );
}
...
</x-tad-bigger>
(And if I try to access any of the address's values, it fires off the fault to the database.) The point being that the questionResponses prefetch sticks, but the address does not.
Now comes the
really crazy part -- If I start a new session and preform the exact same fetch, the address is properly prefetched!
Does anyone have a clue why this would happen? I know it's a long shot, but many thanks to anyone who can help.
Alex Johnson
|
| |
|||
|| | |
||
| | |
|| || |
||
\\ SITE 9 \\ SITE9.COM \\ 312.670.8469 \\
_______________________________________________
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