ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vadboss <vadb...@gmail.com>
Subject Re: IBatis: boolean mapping misunderstanding
Date Mon, 03 May 2010 12:28:00 GMT

<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-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@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-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message