1
I’m starting to use the framework uaiCriteria and I need a result that is a sum of records in a period.
Something like (simplified):
select sum(valor), sum(desconto), data, idpessoa from tabela group by data, idpessoa
Fez:
UaiCriteria<Despesa> uc = UaiCriteriaFactory.createQueryCriteria(getEntityManager(), Despesa.class);
uc.sum("valor").sum("desconto").groupBy("data","pessoa");
I hoped he would return to me a collection of objects (Despesa
) with the totaled attributes. but it returns me only one object Despesa
with the value of only one of the objects.
We have the creator/parent of this framework here, I don’t know if marking the same here will be notified, but it doesn’t cost to try. @uaiHebert.
– Fernando Leal