You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Ivan Makkaveyev <im...@grtcorp.com> on 2001/04/11 07:06:20 UTC

Criteria, Order By and complex Queries again

Hello All!

It seems that in some situation we still cannot avoid tedious manual Query
coding...
Could somebody explain me how to set sorting in descending order?
I think Criteria.addOrderByColumn doesn't help in this situation.

Besides solving problems with complex queries that use, for example,
functions
into WHERE condition, sometimes I still prefer precise manual coding for
efficiency.

Is it possible to use resultSet2Objects() method for complex queries
included Joins or
is there another workaround? I can only imagine direct usage of Village's
QueryDataSet
and manual object Vector creation if I need something like this (or even
simple, but with Join):

select F_ID, COUNT(*) from F, O where F.F_ID = O.O_ID GROUP BY F_ID HAVING
COUNT(*) > 1 order by F_DATE desc;

Creating one Vector then looping on it to select from joined table looks
very inefficient
especially if the result is a small fraction of first query.

Examples would be gratly appreciated.

Thanks in advance,
Ivan



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org