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 Ju...@Bertelsmann.de on 2003/06/27 14:28:02 UTC

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.