ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Maves <Nathan.Ma...@Sun.COM>
Subject Re: Problem getting BLOB from oracle
Date Fri, 12 Aug 2005 16:08:16 GMT
An error would be nice :)

The only thing I can see is that you might try removing the  
typeHandler attribute.  iBatis will figure it out based on the jdbcType.

Nathan

On Aug 12, 2005, at 9:39 AM, Steven Pannell wrote:

> Hi,
>
> I'm trying to get a BLOB from an oracle 10g DB but all I get are  
> the first
> few bytes.  I have the latest jdbc14.jar from oracle and the map  
> looks like
> this:
>
>     <resultMap id="testMap" class="TestBean">
>         <result property="content" column="document" jdbcType="BLOB"
> typeHandler="com.ibatis.sqlmap.engine.type.BlobTypeHandlerCallback"/>
>     </resultMap>
>
>     <select id="test" resultMap="testMap" parameterClass="long">
>         select document from document_table where id =  #value#
>     </select>
>
> My bean is as so..
>
> public class TestBean {
>
>     byte[] content;
>
>     public byte[] getContent() {
>         return this.content;
>     }
>
>     public void setContent(byte[] b) {
>         content = b;
>     }
>
> }
>
>
> What am I doing wrong?? I followed the wiki note...but still no  
> joy.  anyone
> some tips??
>
> thx.
> Steve.
>


Mime
View raw message