I have following projection:
Code:
ProjectionList projList = Projections.projectionList();
projList.add(Projections.groupProperty("t.code"), "code");
projList.add(Projections.groupProperty("t.title"), "title");
projList.add(Projections.groupProperty("e.durationInMinutes"), "estimate");
projList.add(Projections.sum("ad.durationInMinutes"), "actual");
How can I write a projection where ad.durationInMinutes can also be null. Now I get null as sum, I'd like to get 0.
Here an example in SQL:
select code, title, estimate, SUM(ISNULL(durationInMinutes, 0)) as actual from ...Any help appreciated.