Todd,
Thanks for the tip - unfortunately that was a typo in the example I posted,
not in the actual code I was running. I was doing the same query for
different objects and, like I said, found that in some cases I got the right
results and in others did not. 


Margaret


-----Original Message-----
From: Todd V. Jonker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 4:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] [Castor JDO] problem using OQL with nested
objec ts


Margaret,

You need to put the % wildcard in the bound value, not the query itself.

Something like:

  Query query = Qdb.getOQLQuery(
      "select a from Obj1 a where a.obj2.name=$1");
  query.bind("%Schmoe");

Note also the "$1" to indicate the first parameter.  These facts aren't
documented well (if at all) in the current release.


.T.

On 7/24/02 2:50 PM, [EMAIL PROTECTED] wrote:

> Kishore,
> I'm a little hazy on this, but when I was trying to use a query like:
> Query query=Qdb.getOQLQuery("select a from Obj1 a where a.obj2.name =
> %1");
> query.bind("Schmoe");
> query.execute();


Todd V. Jonker
Inpath Solutions, LLC
www.inpathsol.com

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to