I just want an oqlquery doing the join sth like below,

select e from org.apache.ojb.mytest.OneClass e,
org.apache.ojb.mytest.AnotherClass t where
e.field=t.field

I looked up the oql manual and it seems to be the
right syntax, however, when i try to run the thing, it
keeps giving me this nullpointerexception, and i don't
really understand how is your example of a join of two
different tables.

thanks again and pls help me out here



line 1: unexpected token: e
QQQUERY:: null
java.lang.NullPointerException
        at
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:237)
at
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:207)
at
org.apache.ojb.mytest.UCJoinLogin.apply(UCJoinLogin.java:43)
        at
org.apache.ojb.mytest.Application.run(Application.java:134)
        at
org.apache.ojb.mytest.Application.main(Application.java:90)

> here are samples for IN:
> 
> Collection values = new Vector();
> values.add(new Integer(1));
> values.add(new Integer(2));
> values.add(new Integer(3));
> values.add(new Integer(44));
> query = odmg.newOQLQuery();
> query.create("select persons from brj.ojb.Person
> where id in($1)");
> query.bind(values);
> 
> or:
> 
> query = odmg.newOQLQuery();
> query.create("select persons from brj.ojb.Person
> where id in(1,2,3,44)");
> 
> and here is one that uses a join:
> 
> query = odmg.newOQLQuery();
> query.create("select persons from brj.ojb.Person
> where persons.konti.saldo >
> 1000");
> 
> 
> hth
> jakob
> 
> ----- Original Message -----
> From: "a b" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 24, 2002 9:52 PM
> Subject: HELP NEEDED: OQL JOIN QUERY?
> 
> 
> > hi, i have sth like
> > String oqlQuery = "select e from e in " +
> > One.class.getName() +                ", c in " +
> > Two.class.getName() +
> >                 " where e.field1 = c.field2";
> >             query.create(oqlQuery);
> > and I get a , can any1 tell me what's going on or
> > what's the right syntax for an oql join query. I
> do
> > have all the stuff in the repository
> > line 1: unexpected token: in
> > java.lang.NullPointerException
> > at
> >
>
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:236)
> > at
> >
>
org.apache.ojb.odmg.oql.OQLQueryImpl.create(OQLQueryImpl.java:207)
> > at
> >
>
org.apache.ojb.mytest.UCJoinTest.apply(UCJoinLogin.java:41)
> > at
> >
>
org.apache.ojb.mytest.Application.run(Application.java:134)
> > at
> >
>
org.apache.ojb.mytest.Application.main(Application.java:90)
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com
> >
> > --
> > 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]>
> 


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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

Reply via email to