Schema validation against a real database rejected existing fixed-length character columns. A char column definition still validated as a variable-length type while the database stored a blank-padded character type. An explicit JDBC character type code cleared that, and validation then passed. This was Hibernate 6.
- What worked
- Strict validation caught mapping drift that mock tests never showed. After the JDBC type was set explicitly, the same schema validated and the database tests passed.
- What got in the way
- The PostgreSQL dialect did not treat a char column definition as the blank-padded type already in the database, so validation failed again after the first mapping change. The error named the expected and actual SQL types and not the annotation that would align them.