<insert id="clockUserIn" parameterType="domain.ClockUser">
                INSERT INTO
                clock_operations (user_id, date, clock_in)
                VALUES (#{id},
                #{lastActionDate}, true)
</insert>

<insert id="clockUserOut" parameterType="domain.ClockUser">
                INSERT INTO
                clock_operations (user_id, date, clock_in)
                VALUES (#{id},
                #{lastActionDate}, false)
</insert>

This works ok. FOr the first case it inserts 1 and 0 for the second
statement.




Larry Meadors wrote:
> 
> OK, so you have a boolean in your bean, and a tinyint in your database
> and it's getting mapped to true regardless of the int value.
> 
> What about insert/update? Are they setting the database to 0 and 1, or
> always using the same value?
> 
> Larry
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
> For additional commands, e-mail: user-java-h...@ibatis.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/IBatis%3A-boolean-mapping-misunderstanding-tp28432952p28434560.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to