Hi all,
Sorry I put wrong OQL query. Here you can find correct one:
OQLQuery query = odmg.newOQLQuery();
query.create("select from cust in " + Customers.class.getName() +
", sale in" + Salespeople.class.getName() +
" where sale.city = cust.city");
query.execute();
Sorry for inconvience.
Thanks,
Nick
----- Original Message -----
From: "Nick Gudushauri" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 5:26 PM
Subject: Re: OJB OQL implementation problem
> Hi,
>
>
>
> First of all thanks for your clarification.
>
>
>
> Currently we are evaluating ODMG OQL implementation facilities and we met
> some other complications. If problem with equal expression described in my
> last letter will be resolved, we will run into another one: Suppose we
have
> Customers and Salespeople objects, each with 'city' property and we want
to
> load all salespeople whose clients are located in the same city (these
> object does not contain collection of each other). According ODMG OQL
> standards we can write something like this:
>
>
>
> OQLQuery query = odmg.newOQLQuery();
>
> query.create("select from sale in " + Customers.class.getName() +
>
> ", sale in Salespeople.class.getName() " +
>
> " where sale.city = height.city");
>
>
>
> query.execute();
>
>
>
> When we tried to execute above OQL statement we got
> 'java.lang.NullPointerException' exception with text: 'line 1: unexpected
> token: in'.
>
>
>
> After analyzing oql-ojb.g grammar file we found that 'from' clause doesn't
> support object aliases at all.
>
> It means that we have not possibility to use multi tables in query and
> accordingly operations with joins.
>
>
>
> Do you know if object aliases support will be implemented in OJB ODMG, and
> if yes, can you say approximately when it will be done?
>
> Is there any other way to resolve this issue using only ODMG API?
>
>
>
> Thanks,
>
> Nick
>
>
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>