I was trying to use the Tuple option to get the result of fields mix of Entities and sum of values and seems the Studio has a very good option but not sure how to get the Entity and values from the resultList and didn’t find any documentation on it.
This generates:
final List<DpsAcctStatement> dpsAcctStatementList = dataManager.load(DpsAcctStatement.class)
.query("select d.dpsAccount, SUM(d.amount) from dps_DpsAcctStatement d where d.dpsAccount.dpsStatus = :dpsAccountDpsStatus1 group by d.dpsAccount")
.parameter("dpsAccountDpsStatus1", DpsStatus.APPROVED)
.list();
However, when I run, I get the following exception:
DevelopmentException: DataManager cannot execute query for single attributes
Any code snippets would help