Grails projection on arithmetic expression with executeQuery()?

前端 未结 4 1478
栀梦
栀梦 2021-01-14 09:26

I need to get a sum of all items sold per order per store. I am running a sum() on expression using executeQuery(). It works fine as shown below but I wanted to know if ther

4条回答
  •  时光说笑
    2021-01-14 10:08

    I'd try to add a transient derived property total to OrderItem and use sum() on it.

提交回复
热议问题