Hi again,

> 
> Hi Thomas,
> 
> I tried it out with several several quotes. The DEBUG Level for the
> SqlGenerator doesn't say anything.

Hmm, it works fine for me... 
So just try to use P6Spy.


> Isn't there a documentation for the OQL implementated in OJB? 
> Because it it
> is not standard conform! Otherwise some other things like
> "select allObject from ServerVOExtent as allObjects" would 
> work, etc. So
> from where should I know what is supported and how the syntax is?

good point. Unfortunately the only exact documentation is the oql grammar
that is used to generate parser.
It can be read as a simple EBNF Grammar, so it should get you started.
http://cvs.apache.org/viewcvs.cgi/*checkout*/db-ojb/src/java/org/apache/ojb/
odmg/oql/oql-ojb.g?rev=HEAD&content-type=text/plain

The really sad story about this grammar is, that it was taken from the
official ODMG website and only modified to generate OJB queries. We did not
modify the structure of the grammar itself.

cheers,
Thomas

> 
> Julia.
> 
> -----Urspr�ngliche Nachricht-----
> Von: Mahler Thomas [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 27. Juni 2003 15:18
> An: 'OJB Users List'
> Betreff: RE: OQL Query
> 
> 
> 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]
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

Reply via email to