Closed jky0ung closed 1 week ago
SalesSummary cannot be used inside a query because it is a type of query result.
For this reason, you must use sum(caseWhen(path(Transaction::paymentMethod).equal("cash")).then(path(Transaction::amount)))
or sum(caseWhen(path(Transaction::paymentMethod).equal("card)).then(path(Transaction::amount)))
.
This issue seems to be resolved, so I'll close it.
I am encountering an error when trying to sort by a field in the DTO.
Question
How can I sort by a field in the DTO?
The current code results in the following error:
I would appreciate any guidance or suggestions on how to resolve this issue.