Broken boolean mapping after 6.2

We do have a legacy database running on Oracle where we in some situations maps certain attributes in such a way that any non null varchar2 value is true, null is false. We do this mapping using this converter:

import jakarta.persistence.AttributeConverter;
import jakarta.persistence.Converter;
@Converter
public class BooleanXConverter implements AttributeConverter<Boolean, String> {

    @Override
    public String convertToDatabaseColumn(Boolean val) {
        return val!=null && val ? "X" : null;
    }

    @Override
    public Boolean convertToEntityAttribute(String val) {
        return val!=null;
    }

}

Prior to 6.2 this worked in 6.2 we do get failure in getCheckCondition as it doesn’t seem to handle null values returned by convertToDatabaseColumn.

You are running into [HHH-17275] - Hibernate JIRA. Please watch that issue for updates.