Filter with Enum value not working with hibernate 6.4.8

We have a spring boot 3.1.0 version application where we have JPA based OData APIs with Apache Olingo Java V2 library. The hibernate-core version currently is 6.2.2; and odata API with filter on Enum property which has ordinals maintained in DB works fine.
Upon upgrading spring boot to version 3.2.6, the odata API with filter doesn’t work anymore. Hibernate-core version after upgrade is 6.4.8.
Below API doesn’t work anymore:
/api/v1.0/odata/status?$format=json&$filter=type ne ‘NEW’
with error:

class java.lang.IllegalArgumentException : org.hibernate.query.SemanticException: Operand of ‘like’ is of type ‘EnumType’ which is not a string (its JDBC type code is not string-like)

However, if the operator is “eq”, it works fine:
/api/v1.0/odata/status?$format=json&$filter=type eq ‘NEW’

Here, ‘NEW’ is a valid Enum value for that Enum type.

Is this a bug with hibernate 6.4.8 and a correction available? Or any workarounds? Please suggest.

Whatever this Apache Olingo endpoint is doing, it is not correct. It tries to compare an enum attribute with a string like ... where alias.enumAttribute = 'NEW'. You should reach out to the developers of that HTTP endpoint to tell them that the correct way of comparing enum attributes against values is to either use a parameter and bind that to the enum value like ... where alias.enumAttribute = :param of use an enum literal like ... where alias.enumAttribute = NEW or ... where alias.enumAttribute = SimpleEnumName.NEW

I had similar problem in hibernate 6.4+, but Filtering, JPQL quires and custom joins start to work after I add @JdbcType annotation. So my fixed mapping looks like:

@Column(nullable = false)
    @Enumerated(jakarta.persistence.EnumType.STRING)   
    @JdbcType(PostgreSQLEnumJdbcType.class)
    private OrderStatus status;