Hi Julia,

I think it has to do with the extra quotes.
You should have a look at the generated SQL statements (either by enabling
log level DEBUG for SqlGenerator or by using the P6Spy tracer (as documented
in the FAQ))

another option would be to use oql parameter binding. 

cheers,
Thomas

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 27, 2003 2:28 PM
> To: [EMAIL PROTECTED]
> Subject: OQL Query
> 
> 
> Hello,
> 
> I have a Value Object called ServerVO with a corresponding 
> table. The table
> contains two entries. The primary key is composed of the fields:
> protected String locale;
> protected int entryId;
> 
> It is no problem to select all entries contained in the table with the
> following query:
> query.create("select allObjects from " + ServerVO.class.getName());
> 
> It is also no problem to select by a specific id:
> query.create("select allObjects from " + 
> ServerVO.class.getName() + " where
> entryId=" + primaryKey);
> 
> But I'm not able to select by the locale:
> query.create("select allObjects from " + 
> ServerVO.class.getName() + " where
> locale = \"EN\"");
> 
> I dont get a exception or something like this. It simply 
> returns no result.
> I checked the spelling of the columns and attributs over and 
> over again. And
> i swear that the entries in the database exist and that 
> locale is "EN"! ;-)
> 
> So what else could be wrong?
> 
> Where can I find an OQL reference instead (because the odmg 
> site is down).
> 
> Julia.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

Reply via email to