I found this post in Hibernate's forums:
https://forum.hibernate.org/viewtopic.php?f=1&t=944165&p=2247802&hilit=postgres+boolean+smallint#p2247802
In summary, Hibernate will handle converting a char(1) in the database to/from boolean in java, and from that post, it
worksin DB2 and PostgreSQL.
So here's another option. Change your smallint in the database to a char(1). The only thing it affects is the DDL for
eachdatabase, any existing data you have in the database, and the Hibernate mapping files. Your java code remains
untouched.
-- Jeff Hubbach