To make this question simpler, how to do reportquery where:
queryArguments[0] ="id";
queryArguments[1] ="sum(foo.bar * foo.quux *)";
Thanks,
Joose
Joose Vettenranta kirjoitti 23.11.2007 kello 14.59:
Hi,
I have query that has like SELECT sum(foo) FROM bar; and that works
ok. Problem comes with following syntax:
SELECT sum(foo * quux) FROM bar;
Code goes something like this:
query=new
org
.apache.ojb.broker.query.ReportQueryByCriteria(ibizobj.getClass(),
criteria);
queryArguments[0]="id";
queryArguments[7]="sum(orderItems.unitPrice * orderItems.amount)";
query.setAttributes(queryArguments);
groupArguments[0]="id";
query.addGroupBy(groupArguments);
query.setPathOuterJoin("orderItems");
and outcome: SELECT looks like this on server:
SELECT ...sum(orderItems.unitPrice * orderItems.amount)...
and respone: "adding missing FROM" and "orderItems not found"..
it should do something like SELECT ....sum(A2.unitPrice * A2.amount)..
Is this feature that is not implemented in 1.0.4 or am I missing
something?
Thanks,
Joose
---------------------------------------------------------------------
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]