In the latest 3.0 code, I changed it to the following:

<mapping>
   <java-type>java.lang.Boolean</java-type>
   <jdbc-type>CHAR</jdbc-type>
   <sql-type>BOOLEAN</sql-type>
</mapping>

This was the consensus on the dev list.

-dain

> -----Original Message-----
> From: Hunter Hillegas [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 21, 2002 1:25 PM
> To: JBoss 2
> Subject: [JBoss-user] Postgres Boolean Mapping with JBossCMP
> 
> 
> I'm having trouble mapping a boolean with Postgres and JBossCMP
> (JBoss3alpha).
> 
> What is the correct mapping? Right now I am using:
> 
>         <jdbc-type>TINYINT</jdbc-type>
>         <sql-type>INT2</sql-type>
> 
> But this doesn't seem to work... In my entity the datatype is 
> boolean...
> Now, changing this value via my Web app does nothing... If I set it to
> 'true' or 'false', the value in the DB is still '1'. I'm assuming I'm
> misunderstanding this or doing it wrong...
> 
> If I am using boolean in an entity, what does the DB mapping 
> need to be for
> postgres?
> 
> Thanks,
> Hunter
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to