You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Thomas Schriefer <th...@gmx.de> on 2003/07/02 08:13:45 UTC

Variables in JDO-Query

Hi, I tried the following Jdo-Query:

"(!_oCollMeasureSizeFit.isEmpty())"
+ " & (!collectionKundeMasstabelle.isEmpty())"
+ " & (collectionKundeMasstabelle.contains(oC))"
+ " & (oC.nIDKunde == oCustomer.nID)"
+ " & (!collectionGroesseMasstabelle.isEmpty())"
+ " & (collectionGroesseMasstabelle.contains(oS))"

+ " & (oS.nMesswertAbs > oC.nMesswertAbs)");

With the following variables:
"SizeMeasuretable oS;CustomerMeasuretable oC;"

And the Parameter:
"Customer oCustomer"

And got:
com.sun.jdori.query.JDOQueryException: Cannot access unbound variable
'oC'. Unbound variables do not have a corresponding contains clause.

But when I delete the + " & (oS.nMesswertAbs >
oC.nMesswertAbs)"-statement, it works. So I think there is a bug: JDO
(or OJB?) doen't remember "oC" after materializing "oS".
Any help is welcome. Tom.