Fetch specification and raw SQL
Fetch specification and raw SQL
- Subject: Fetch specification and raw SQL
- From: Pascal Robert <email@hidden>
- Date: Mon, 1 Aug 2005 10:02:16 -0400
Hi list,
I noticed that fetching seems to be very slow when doing a fetch of
more than 1000 rows and one of the column is a CLOB. The slowdown is
not only with EOF but also with SQLGrinder, so I guess it's Oracle JDBC
driver who is slow since with SQLPlus, it's very fast.
So I created a Fetch Specification in my model so that the fetch will
return all fields except the CLOB. Problem is, I have to use a raw SQL
expression because the fetch is done with the CONTAINS operator. In
EOModel, I specified 'Use Raw SQL Expression' and I tried thw following
WHERE clause :
WHERE CONTAINS(AEA_TEXTE, '?', 0) > 0
and in my code :
NSMutableDictionary dictParamsRecherche = new NSMutableDictionary();
dictParamsRecherche.takeValueForKey(recMotClef,"AEA_TEXTE");
EOModelGroup modelGroup = EOModelGroup.defaultGroup();
EOFetchSpecification fs =
modelGroup.fetchSpecificationNamed("fetchElementsExcluTexte","AaElementA
rticle");
fs = fs.fetchSpecificationWithQualifierBindings(dictParamsRecherche);
NSArray elements = ec.objectsWithFetchSpecification(fs);
When doing the fetch, I get this error :
...WHERE CONTAINS(AEA_TEXTE, ?, 0) > 0 ">:
Next exception:SQL State:72000 -- error code: 1008 -- msg:
ORA-01008: not all variables bound
So even if I assign a variable in the dictionary, I get an error. I
also tried with 'aeaTexte' (EOF name) instead of AEA_TEXTE (Oracle
name), I get the same error. Can you assign variable when using raw
SQL expression ?
_______________________________________________
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