Hibernate处理clob和oracle sequence的备忘录

Posted by eDWARD at 17:30

Hibernate处理clob类型的字段

    方法一

    字段类型为java.sql.Clob。dataobject & xdoclet:

    hbm.xml:

    方法二

    DataObject中的数据成员类型为String,映射的数据库字段类型为org.springframework.orm.hibernate.support.ClobStringType
    Xdoclet:

    hbm.xml:

    如果使用spring的这个clob类型就需要在applicationContext.xml中的sessionFactory里修改如下配置

    这两只方式在采用oracle thin方式连接的情况下都有传输限制,解决方法是采用oci连接方式(jdbc:oracle:oci10:@sid)

Hibernate处理oracle sequence

    Xdoclet:

    hbm.xml:

    前提是要提供SEQ:)

Sphere: Related Content

Filed In 学习路上 | Study | Tags: |

Your Comments.

Leave your own response

Leave a Reply.

Comment Form.

Fields denoted with a "*" are required. Your comment may require moderation, please be patient.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>




Your Reply.

Use the following link to trackback from your own site:
http://www.zhangzhang.net/articles/2006/11/26/hibernate-clob-oracle-sequence/trackback/

Spread the word.

Octopus supports RSS feed for this post RSS 2.0 , and Trackbacks from other blogs.

Technorati

  品位不凡,威严,略显高深,喜爱一切美丽的事物,易怒,固执,有些利己,但关心接近他的人。谦逊,但非常有野心,有才能,刻苦,是不甚令人满意的伴侣,朋友众多,树敌也多,是可以信赖的人。


bloglines
google reader
my yahoo
订阅我的博客