Can someone please tell me why the standard type mapping for Boolean, on PostgreSQL, is:
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>INT2</sql-type>
</mapping>
This doesn't make any sense to me, at all. I have built several projects now on JBoss + PostgreSQL and I've always changed the boolean mapping to as follows:
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>BOOL</sql-type>
</mapping>
This lets me use the PostgreSQL native "boolean" data type, as well as use CMP field types of "boolean" or "Boolean".
I don't remember why I declared the JDBC-Type to be VARCHAR -- it was almost a year ago now that I first got all this worked out.
Anyway -- if there is no good reason for the TINYINT/INT2 mapping (and I've asked several jboss lists, several times in the past, and gotten no good answers), then I recommend changing to to my revised settings.
Bryan
