Thanks... for the record then 'date' was a bad name for a class
attribute to be persisted in OQL?

On Fri, 2004-03-26 at 09:20, Brian McCallister wrote:
> Here is the problem:
> 
> from src/java/org/apache/ojb/odmg/oql/OQLLexerTokenTypes.txt
> 
> LITERAL_date="date"=61
> 
> the word "date" is a token in OQL =(
> 
> -Brian
> 
> On Mar 25, 2004, at 5:00 PM, Angus Berry wrote:
> 
> > (rc5)
> >> From everything I've read I think this should work. I'm trying to 
> >> select
> > an object by it's id & date:
> >
> > query.create("select invoice from " + InvoiceBO.class.getName() + "
> > where invoiceID = $1 and date = $2");
> >
> > Before I even get to bind the query values (query.bind(invNum)), I get
> > an error saying:
> > line 1: unexpected token: and
> >
> > The following select also fails:
> > query.create("select invoice from " + InvoiceBO.class.getName() + "
> > where date = $1");
> > line 1: unexpected token: date
> >
> > However, if I use a line like the one below it will select OK (given 
> > the
> > correct params):
> > query.create("select invoice from " + InvoiceBO.class.getName() + "
> > where invoiceID = $1 and clientName = $2");
> >
> > Have done a bad thing by have a property called 'date' in my class, or
> > is my syntax incorrect for a date select.
> >
> > thanks
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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]
> 
> 
> C


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to