Re: report query in order by

2006-10-24 Thread Abid Hussain
Hi again, thank you Vasily for the workaround. But as you said in you mailinglist-posting, it would be more desireable to use code like QueryByCriteria.addOrderBy(ReportQuery)...:-( Maybe there will be a proper way to solve the problem sometime...:-) Regards, Abid Vasily Ivanov schrieb: H

Re: report query in order by

2006-10-23 Thread Vasily Ivanov
Hi Abid, It was me who posted that question. I also posted an improvement request into Jira: https://issues.apache.org/jira/browse/OJB-104 There is a workaround in there. Have a look. Regards, Vasily On 10/23/06, Abid Hussain <[EMAIL PROTECTED]> wrote: Hi everybody, the following problem wa

report query in order by

2006-10-23 Thread Abid Hussain
Hi everybody, the following problem was already posted in the mailinglist in March 06. <-- I've got two classes: class Parent: int id String data Collection children class Child: int id String data int parentId Parent parent I need to get collection of parents sorted by the number

Re: Report Query in ORDER BY

2006-03-09 Thread Armin Waibel
Vasily Ivanov wrote: ok. I have no idea what "jira" is. Could you give me the link? It's the OJB issue tracking http://issues.apache.org/jira/browse/OJB regards, Armin On 3/10/06, Jakob Braeuchi <[EMAIL PROTECTED]> wrote: hi vasily, you're right. we do not support ordering by subquery. yo

Re: Report Query in ORDER BY

2006-03-09 Thread Vasily Ivanov
ok. I have no idea what "jira" is. Could you give me the link? On 3/10/06, Jakob Braeuchi <[EMAIL PROTECTED]> wrote: > hi vasily, > > you're right. we do not support ordering by subquery. > you can open a feature request on jira. > > jakob > > Vasily Ivanov schrieb: > > Hi Jakob, > > > > As I unde

Re: Report Query in ORDER BY

2006-03-09 Thread Jakob Braeuchi
hi vasily, you're right. we do not support ordering by subquery. you can open a feature request on jira. jakob Vasily Ivanov schrieb: Hi Jakob, As I understand, report subquery (with Criteria.PARENT_QUERY_PREFIX + "id") can be used only in WHERE clause (Criteria class), but not in ORDER BY cl

Re: Report Query in ORDER BY

2006-03-08 Thread Vasily Ivanov
Hi Jakob, As I understand, report subquery (with Criteria.PARENT_QUERY_PREFIX + "id") can be used only in WHERE clause (Criteria class), but not in ORDER BY clause. Have a look: QueryByCriteria.addOrderBy(String, boolean) QueryByCriteria.addOrderBy(FieldHelper) QueryByCriteria.addOrderByAscending(

Re: Report Query in ORDER BY

2006-03-08 Thread Jakob Braeuchi
hi vasily, you can use Criteria.PARENT_QUERY_PREFIX to prefix an attribute of the subquery. see QueryTest#testSubQuery3 and testSubQuery4. but i've to admit i nver tried it with addOrderBy(). hth jakob Vasily Ivanov schrieb: Hi All, I've got two classes: class Parent: int id String da

Report Query in ORDER BY

2006-03-08 Thread Vasily Ivanov
Hi All, I've got two classes: class Parent: int id String data Collection children class Child: int id String data int parentId Parent parent I need to get collection of parents sorted by the number of children, but I didn't find any way to put Report Query to "ORDER BY" statement.