I add the formula to the field:
@Formula(value = "(select count(*) from approvalGroup as a where a.isAccounting=true)")
But the request does not work, because Hibernate is trying to make a "true" field on my object.
An exception:
[ERROR] Unknown column 'approvalgr0_.true' in 'where clause'
How can I say that Hibernate is a constant value, not what it needs to extract from an entity object?
source share