ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: SQLMap, mapping from SQL CHAR(1) to Java char ?
Date Fri, 11 Mar 2005 21:12:23 GMT
ibatis does not know to covert char(1) to boolean. I would assume that
is a driver thing. If i used the getBoolean("columnName") with jdbc it
will be up to the driver to convert that. We appreciate the pat on the
back. But, it is not ours to have.

Also, there is no getChar() in jdbc so there is no way to map to a
char type. You will have to make it a string.

Brandon


On Fri, 11 Mar 2005 15:03:39 +0100, erlend.bjorge@aftenposten.no
<erlend.bjorge@aftenposten.no> wrote:
>  
> Hi there! 
>   
> Can't find anything about this issue in the developer guide,  and I get this
> message: 
>   
> com.ibatis.common.exception.NestedRuntimeException: Error occurred.  Cause:
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath
> '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException:
> Error parsing XML.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath
> '/sqlMap/resultMap/result'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Error.  Could not set
> TypeHandler.  Cause: java.lang.ClassNotFoundException: char
> Caused by: java.lang.ClassNotFoundException: char 
>   
> --- 
>   
> Of cource it can't find class "char", but since char is a primitive type as
> int, boolean, I was hoping 
> SQLMap was suporting this ? 
>   
>  
> I guess I need to change my char to String ??? 
>   
> --- 
>   
> Btw, I'm impressed by SQLMap anyway, it even manage to map my: 
>   
> CHAR(1)  "1"  to java boolean true  and 
> CHAR(1)  "0"  to java boolean false 
>   
> Automaticaly :-) 
>   
>   
>   
> Thanks for any help on this! 
>   
> Best regards, 
> Erlend Bjørge

Mime
View raw message