Files
hawkbit/hawkbit-ql-jpa
clayly bdb87a95d9 Fix LIKE on non-String fields failing on PostgreSQL (#3008)
* Fix LIKE on non-String fields failing on PostgreSQL-compatible databases

The like() and notLike() methods in SpecificationBuilder relied on
catching a Hibernate-specific CoercionException when LIKE was applied
to non-String fields (e.g. bigint) with a wildcard-only value. However,
with EclipseLink the invalid SQL is sent directly to the database,
where PostgreSQL and compatible databases (YugabyteDB, CockroachDB)
reject it with "operator does not exist: bigint ~~ text".

Move the non-String field check before building the SQL predicate,
making it database-agnostic and JPA-provider-agnostic. A wildcard-only
LIKE on a non-String field is semantically equivalent to IS NOT NULL
(and NOT LIKE to IS NULL), which is what the fallback already produced.

* Trigger ECA re-check
2026-04-21 15:45:02 +03:00
..

hawkBit QL

hawkBit Query Language Support (based on RSQL)