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 "Martin I. Levi" <ml...@labtie.mmt.upc.es> on 2004/10/15 10:54:21 UTC
OQL queries format -repost-
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.
--
Saludos,
Martin I. Levi
Centre Tecnològic de Transferenciència de Calor
Universitat Politècnica de Catalunya
www.cttc.upc.edu
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
RE: OQL queries format -2nd repost-
Posted by Daniel Perry <d....@netcase.co.uk>.
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:jbraeuchi@gmx.ch]
> 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: 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
Re: OQL queries format -2nd repost-
Posted by Jakob Braeuchi <jb...@gmx.ch>.
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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
OQL queries format -2nd repost-
Posted by "Martin I. Levi" <ml...@labtie.mmt.upc.es>.
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.
--
Saludos,
Martin I. Levi
Centre Tecnològic de Transferenciència de Calor
Universitat Politècnica de Catalunya
www.cttc.upc.edu
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org