Compile error when using CriteriaBuilder

后端 未结 3 1925
-上瘾入骨i
-上瘾入骨i 2021-01-19 10:13

I am trying convert this JPA QL to criteria builder. JBoss 6.0.

\"SELECT ba FROM BankAccount ba WHERE ba.balance >= :amt ORDER BY ba.ownerName ASC\"
         


        
3条回答
  •  渐次进展
    2021-01-19 10:53

    The compiler is complaining because amount is an int, not an Expression, see if you can figure out how to build an Expression that's a constant and use that and you should be good.

提交回复
热议问题