hi denis,
why would like to do the joins yourself ? just let ojb the dirty work for
you, use pathExpressions.
select c from c in Country where c.region.name like "A%"
region is the name of the relationship definition between Country and
Region.
hth
jakob
----- Original Message -----
From: "Denis St Flour" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 31, 2002 1:32 AM
Subject: Join with OQL using the ODMG Implementation
Is it possible to perform a join in OQL using the ODMG implementation. I've
got 2 classes namely Country and Region. I want to perform the equivalent of
the following SQL for efficiency purpose :
SQL Equivalent Statement:
select * from country c, regions r where c.regionId = r.regionId and r.name
like 'A%'
I have tried to folow the ODMG standard and create the following OQL query
but I keep getting an unexpected token
select c from c in com.meridianinfo.hr.biz.Country, x in
com.meridianinfo.hr.biz.Region
where c.regionId = x.regionId and
r.name like "A%"
I keep getting an unexpected token : in message
followed by a null pointer exception
org.apache.ojb.odmg.oql.OQLQueryImpl.create
Regards
Denis St Flour
--
To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>