| This bug is also provoking an undesirable side effect: I've changed my character encoding set and collation to utf8mb4 and utf8mb4_unicode_ci so when using CAST(value as CHAR(LENGTH) it provokes hibernate maps the string columns to Java String attributes with an incorrect character set, including wrong chars in the strings. |