Math operators in Criteria queries

↘锁芯ラ 提交于 2019-12-05 21:32:29

You can make a new property in your class that is this computed value. Just specify the formula attribute for that property. Then you can include this property in your Criteria.

<property name="product" formula="aValue*bValue" />

formula (optional): an SQL expression that defines the value for a computed property. Computed properties do not have a column mapping of their own.

you can always add it as sql I think there was some sqlProjection/sqlRestriction method

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!