cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Stobbe <markstobb...@gmail.com>
Subject Another EJBQL question
Date Fri, 07 Nov 2014 17:31:21 GMT
Thanks everyone for your help with the multi-user stuff!!

I managed to implement a hybrid system where individual totals are
calculated in the getXXX method and whenever multiple totals are requested
at once (e.g. in a table) then it loads them with an EJBQL query.

Now I just have to figure out to make a total by summing either column 1 if
set, and otherwise column 2, in SQL:

*SELECT *t.orderNumber, *SUM*(*COALESCE*(t.column1, t.column2)) *FROM *table
t *GROUP BY* t.orderNumber;

But that's not possible in EJBQL, right? Is there a way to extend the
EJBQL? Also, is there a grammar available of the EJBQL?

Mark

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message