You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Clinton Begin (JIRA)" <ib...@incubator.apache.org> on 2005/02/13 00:32:17 UTC
[jira] Closed: (IBATIS-44) BLOB retrieve
[ http://issues.apache.org/jira/browse/IBATIS-44?page=history ]
Clinton Begin closed IBATIS-44:
-------------------------------
Assign To: Clinton Begin
Resolution: Fixed
Fix Version: 2.0.9
implemented in 2.0.9
> BLOB retrieve
> -------------
>
> Key: IBATIS-44
> URL: http://issues.apache.org/jira/browse/IBATIS-44
> Project: iBatis for Java
> Type: New Feature
> Components: SQL Maps
> Versions: 2.0.9
> Environment: windows xp
> jdk 1.4.2
> oracle 9i
> ojdbc14_g.jar
> Reporter: Alexandru Barbat
> Assignee: Clinton Begin
> Fix For: 2.0.9
>
> It seems it doesn't retrieve correctly BLOB fields from db.
> the "conversion" from (db type) BLOB to byte[] (java type) it is not working as expected.
> code extract"
> map look something like this
> ...
> <resultMap id="sea-levels-result" class="sea">
> <result property="idSea" column="IDSEA"/>
> <result property="value" column="SEA_LEVEL"/>
> <result property="dsca" column="DSCA"/>
> <result property="image" column="IMG" />
> </resultMap>
> <select id="getSeaLevels" parameterClass="string" resultMap="sea-levels-result">
> select IDSEA as IDSEA,
> SEA_LEVEL as SEA_LEVEL,
> DSCA as DSCA,
> IMG
> from SEA
> where ID=#value#
> </select>
> ...
> property "image" has byte[] type and column "IMG" has BLOB type
> the call is something like this:
> ...
> List res = getSqlMap().queryForList("getSeaLevels", id);
> ..
> the problem is that in the propery 'image' of class 'sea' I will find 86 bytes (but in reality are only 10)
> and those 86 bytes are not the same at all with those 10.
> If somebody could help I'll appreciate.
> I have searched for a similar example but I didn't found any.
> ps
> the update to a BLOB field seems to work very well.
> Thanks.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira