2009-09-30

Oracle BLOB/CLOB Handling of iBATIS

The followings are tested and applied with iBATIS 2.3 and Oracle 10g. In case of iBATIS 3, is there anyone who tested the same thing ?


Oracle CLOB columns can be mapped string fields like VARCHAR2 columns without additional type handler or explicit Java/JDBC type description. In fact this feature is completely the benefit of enhancement of Oracle JDBC driver. Oracle JDBC driver higher than 10.2 provides functionality to handle CLOB column like varchar cloumn and it will work with Oracle database 9i as well as Oracle database 10g or higher. About this you can refer the following article.


Oracle BLOB column can be mapped byte[] field without custom handler using JDBC type and Java type description in result map definition or parameter map definition. This feature needs iBATIS 2.0.9 or higher and recent Oracle JDBC driver. Unlike the above article, the javaType="[B" should be described explicitly in my case.

0 comments:

Post a Comment