How to trim white spaces from char fields pojo using hibernate and Legacy database
问题 My table has column as char(5) and can not change it to varchar(5). So when I fetch values out from the table using hibernateTemplate , that returns added spaces with actual say single alphabet value.(A custome fix is to use .trim() method with checking NPE) but do we have a provided approach to handle this kind of situation. PS.I am using Spring support for hibernate dao support. (In SQL, the CHAR data type is a fixed length character string. By definition, the additional characters are