Database columns defined as Char are handled differently for mysql and postgres dialect. The properties populated in entities are different for the two dialects.
If a column is defined as a fixed length char, the mysql dialect populates an enitity property with a variable length string. The postgres dialect populates an entity property with a fixed length string that has the came length as the database column, padded with whitespace after the string that had been persisted.
I would have expected the two dialects to return the same result, whether that is a fixed length string or a variable length string.
test case:
https://github.com/johnaoahra80/test_cases/tree/master/hibernate/charDialectDelta
|