You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Grim Shieldsson <gr...@yahoo.com> on 2003/05/10 00:20:31 UTC

Problem with OQL from the OQL PDF

I have two classes:
class A { 
private String name;
}
class B{ 
A anA;
}

What I need to find is all B's that have an A with name "foo*".
According to the OQL pdf I have, the oql should look like:

select b
from b in B
where b.anA.name like "foo*"

Is this correct?  Why do I get an NPE with a message about unexpected
toke "in".

James A Barrows
Software Developer
Modern Medieval Sports

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Re: Problem with OQL from the OQL PDF

Posted by Grim Shieldsson <gr...@yahoo.com>.
--- Jakob Braeuchi <jb...@gmx.ch> wrote:
> hi grim,
> 
> could you please post the sql ?
> 

I haven't actually hooked up the p6spy stuff to see the generated sql.
The OQL, is exactly what was given, except for name changes.

> jakob
> 
> Grim Shieldsson wrote:
> 
> >--- Jakob Braeuchi <jb...@gmx.ch> wrote:
> >  
> >
> >>hi grim,
> >>
> >>use the follwing oql 'select b from B where b.anA.name like "foo*"'
> >>    
> >>
> >
> >Well, I'm not getting any errors from OJB, but I'm also not getting
> any
> >data either.
> >Maybe rc3 will help....
> >
> >
> >  
> >
> >>hth
> >>jakob
> >>
> >>Grim Shieldsson wrote:
> >>
> >>    
> >>
> >>>I have two classes:
> >>>class A { 
> >>>private String name;
> >>>}
> >>>class B{ 
> >>>A anA;
> >>>}
> >>>
> >>>What I need to find is all B's that have an A with name "foo*".
> >>>According to the OQL pdf I have, the oql should look like:
> >>>
> >>>select b
> >>>      
> >>>
> >>>from b in B
> >>    
> >>
> >>>where b.anA.name like "foo*"
> >>>
> >>>Is this correct?  Why do I get an NPE with a message about
> >>>      
> >>>
> >>unexpected
> >>    
> >>
> >>>toke "in".
> >>>
> >>>James A Barrows
> >>>Software Developer
> >>>Modern Medieval Sports
> >>>
> >>>__________________________________
> >>>Do you Yahoo!?
> >>>The New Yahoo! Search - Faster. Easier. Bingo.
> >>>http://search.yahoo.com
> >>>
> >>>      
> >>>
>
>>---------------------------------------------------------------------
> >>    
> >>
> >>>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> >>>For additional commands, e-mail: ojb-user-help@db.apache.org
> >>>
> >>>
> >>> 
> >>>
> >>>      
> >>>
>
>>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> >>For additional commands, e-mail: ojb-user-help@db.apache.org
> >>
> >>    
> >>
> >
> >
> >=====
> >Grim Shieldsson (James A Barrows)
> >Acting Chieftain of Clan StormWolf
> >Barbarian Freehold Alliance
> > "The real destroyer of the liberties of the people is he who
> spreads among them bounties, donations and benefits." 
> >--Plutarch
> >
> >__________________________________
> >Do you Yahoo!?
> >The New Yahoo! Search - Faster. Easier. Bingo.
> >http://search.yahoo.com
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> >For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 


=====
Grim Shieldsson (James A Barrows)
Acting Chieftain of Clan StormWolf
Barbarian Freehold Alliance
 "The real destroyer of the liberties of the people is he who spreads among them bounties, donations and benefits." 
--Plutarch

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Re: Problem with OQL from the OQL PDF

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi grim,

could you please post the sql ?

jakob

Grim Shieldsson wrote:

>--- Jakob Braeuchi <jb...@gmx.ch> wrote:
>  
>
>>hi grim,
>>
>>use the follwing oql 'select b from B where b.anA.name like "foo*"'
>>    
>>
>
>Well, I'm not getting any errors from OJB, but I'm also not getting any
>data either.
>Maybe rc3 will help....
>
>
>  
>
>>hth
>>jakob
>>
>>Grim Shieldsson wrote:
>>
>>    
>>
>>>I have two classes:
>>>class A { 
>>>private String name;
>>>}
>>>class B{ 
>>>A anA;
>>>}
>>>
>>>What I need to find is all B's that have an A with name "foo*".
>>>According to the OQL pdf I have, the oql should look like:
>>>
>>>select b
>>>      
>>>
>>>from b in B
>>    
>>
>>>where b.anA.name like "foo*"
>>>
>>>Is this correct?  Why do I get an NPE with a message about
>>>      
>>>
>>unexpected
>>    
>>
>>>toke "in".
>>>
>>>James A Barrows
>>>Software Developer
>>>Modern Medieval Sports
>>>
>>>__________________________________
>>>Do you Yahoo!?
>>>The New Yahoo! Search - Faster. Easier. Bingo.
>>>http://search.yahoo.com
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>    
>>
>>>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>>For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>>
>>> 
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>    
>>
>
>
>=====
>Grim Shieldsson (James A Barrows)
>Acting Chieftain of Clan StormWolf
>Barbarian Freehold Alliance
> "The real destroyer of the liberties of the people is he who spreads among them bounties, donations and benefits." 
>--Plutarch
>
>__________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo.
>http://search.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>  
>


Re: Problem with OQL from the OQL PDF

Posted by Grim Shieldsson <gr...@yahoo.com>.
--- Jakob Braeuchi <jb...@gmx.ch> wrote:
> hi grim,
> 
> use the follwing oql 'select b from B where b.anA.name like "foo*"'

Well, I'm not getting any errors from OJB, but I'm also not getting any
data either.
Maybe rc3 will help....


> 
> hth
> jakob
> 
> Grim Shieldsson wrote:
> 
> >I have two classes:
> >class A { 
> >private String name;
> >}
> >class B{ 
> >A anA;
> >}
> >
> >What I need to find is all B's that have an A with name "foo*".
> >According to the OQL pdf I have, the oql should look like:
> >
> >select b
> >from b in B
> >where b.anA.name like "foo*"
> >
> >Is this correct?  Why do I get an NPE with a message about
> unexpected
> >toke "in".
> >
> >James A Barrows
> >Software Developer
> >Modern Medieval Sports
> >
> >__________________________________
> >Do you Yahoo!?
> >The New Yahoo! Search - Faster. Easier. Bingo.
> >http://search.yahoo.com
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> >For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 


=====
Grim Shieldsson (James A Barrows)
Acting Chieftain of Clan StormWolf
Barbarian Freehold Alliance
 "The real destroyer of the liberties of the people is he who spreads among them bounties, donations and benefits." 
--Plutarch

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Re: Problem with OQL from the OQL PDF

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi grim,

use the follwing oql 'select b from B where b.anA.name like "foo*"'

hth
jakob

Grim Shieldsson wrote:

>I have two classes:
>class A { 
>private String name;
>}
>class B{ 
>A anA;
>}
>
>What I need to find is all B's that have an A with name "foo*".
>According to the OQL pdf I have, the oql should look like:
>
>select b
>from b in B
>where b.anA.name like "foo*"
>
>Is this correct?  Why do I get an NPE with a message about unexpected
>toke "in".
>
>James A Barrows
>Software Developer
>Modern Medieval Sports
>
>__________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo.
>http://search.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>  
>