How to use Projections with Blaze-Persistence Querydsl?
And in bellow example when criteria.getEmail() give me NullPointerException. So How I can overcome NullPointerException for more wheres?
cbf.create(em, WalletReportDto.class)
.fromSubquery(WalletCTE.class, "offerCTO").from(TenantBalanceOffers.class, "tbo")
.bind("walletId").select("tbo.wallet.id")
.bind("amount").select("SUM(tbo.amount)")
.groupBy("tbo.wallet.id").end()
.joinOn(TenantWallet.class, "tw", JoinType.INNER)
.onExpression("offerCTO.walletId = tw.id")
.end() //
.select("MIN(tw.createdDate)", "fromtDate").select("MAX(tw.createdDate)", "toDate")
.select("tw.customer.email", "email")
.select("sum(offerCTO.amount)").where("tw.customer.email").eq(criteria.getEmail())
.groupBy("tw.id")
.getResultList();