As far as i am aware (and i'm not a guru, and havnt used OQL for  a long
while - i ditched it in favor of straing Criteria and QueryByCriteria code),
it should look like:

select id, a.b from MyClass order by  a.b, id;

However, from what i remember OJB seems to ignore the select part, so you
probably dont need the id,a.b above - you could put anything you like eg.
"select monkey from MyClass order by a.b, id;" and it would work.

Daniel.

> -----Original Message-----
> From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
> Sent: 20 October 2004 16:52
> To: OJB Users List
> Subject: Re: OQL queries format -2nd repost-
>
>
> hi martin,
>
> it looks like there are no oql-gurus available. have you checked
> the odmg-website ?
>
> jakob (not an oql-guru)
>
> Martin I. Levi schrieb:
> > Hi!
> >
> > I have a doubt about how an OQL query should be written in order to be
> > processed ok with OJB.
> > The doubt is the following:
> > Which of this two queries is more correct
> > select x.id, x.a.b from MyClass order by  a.b, id;
> > or
> > select x.id, x.a.b from MyClass order by  x.a.b, x.id; ?
> >
> > If I use the second query I have some problems with some table mappings
> > and when I use the first one it has always worked well.
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to