I get the same error trying your suggestion

--- "Gibbs, Tim" <[EMAIL PROTECTED]> wrote:
> 
> 
> I don't know much about oql but don't the two "e"
> references in this
> conflict?
> 
> Aren't you referring to both the attribute and the
> class by the same
> variable "e"?
> 
> Would something like:
> 
> select theAttribute from
> org.apache.ojb.mytest.OneClass class1,
> org.apache.ojb.mytest.AnotherClass class2 where
> class1.field=class2.field
> 
> work better.
> 
> again, don't know if I am helping but that was one
> thing that set off the an
> alarm for me.....
> 
> Cheers,
> 
> Tim
> 
> -----Original Message-----
> From: a b [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 25, 2002 2:04 PM
> To: OJB Users List
> Cc: [EMAIL PROTECTED]
> Subject: Re: HELP NEEDED: OQL JOIN QUERY?
> 
> 
> 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]>
> 
> 
> <font face="Times New Roman" size="3">
>
<p>------------------------------------------------------------------------------</p>
> <p> This e-mail may be privileged and/or
> confidential, and the sender does not waive any
> related rights and obligations. Any distribution,
> use or copying of this e-mail or the information it
> contains by other than an intended recipient is
> unauthorized. If you received this e-mail in error,
> please advise me (by return e-mail or otherwise)
> immediately.</p>
> <p> Ce courriel est confidentiel et prot�g�.
> L'exp�diteur ne renonce pas aux droits et
> obligations qui s'y rapportent. Toute diffusion,
> utilisation ou copie de ce message ou des
> renseignements qu'il contient par une personne autre
> que le (les) destinataire(s) d�sign�(s) est
> interdite. Si vous recevez ce courriel par erreur,
> veuillez m'en aviser imm�diatement, par retour de
> courriel ou par un autre moyen.</p>
>
<p>====================================================</p>
> </font>
> 
> 


__________________________________________________
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