The Boolean data type for example is mapped on an H2 database to the type boolean.
If the original development team has decided to map boolean values using a string with the value "0" and "1", Hibernate allows to implement user-defined types that are used for the mapping.
https://stackoverflow.com/questions/17024931/usertype-nullsafeget-and-nullsafeset-migration