In my model, I declare this NumericBooleanType attribute:
@Column(name = "ST_ATIVO", nullable = false)
@Type(type = "org.hibernate.type.NumericBooleanType")
private Boolean ativo;
Then, in antother class, I am trying to do the following query:
List<Long> test = this.sqlQueryFactory.query()
.select(equipe.id)
.from(equipe)
.where(equipe.ativo.isTrue())
.fetch();
However, I got this error:
org.hibernate.exception.SQLGrammarException: could not extract ResultSet
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: integer = boolean
Shoudn't a NumericBooleanType boolean attribute in the query be converted to int by hibernate?