读书人

spring hibernate clob的没法从套接字

发布时间: 2012-08-27 21:21:57 作者: rapoo

spring hibernate clob的无法从套接字读取更多的数据

两者都需要的JAR包为ojdbc14.jar,或ojdbc15.jar,如果使用class12.jar则不可以

spring 中的配置9i与10g是相同的,都可以用以下程序

?<bean id="nativeJdbcExtractor"
??/>

?<bean id="lobHandler"
??/>
??</property>
?</bean>
?<bean id="sessionFactory"?/>
??</property>
??<property name="lobHandler" ref="lobHandler" />
??<property name="hibernateProperties">
???<props>
?
???? <prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
??? ????<prop key="jdbc.batch_size">1024</prop>
????<prop key="hibernate.show_sql">true</prop>
????<prop key="hibernate.format_sql">true</prop>
????<prop key="hibernate.max_fetch_depth">2</prop>
????? ?<prop key="hibernate.cglib.use_reflection_optimizer">true</prop>
???</props>
??</property>
??<property name="mappingDirectoryLocations">
???<list>
??????? <value>classpath:/com/XXX/model</value>
????</list>
??</property>
?</bean>

但是在9I中的

.hbm.xml 中的字段则要使用以下
<property name="dependContent" type="org.springframework.orm.hibernate3.support.ClobStringType" column="DEPEND_CONTENT">

</property>

?

?

?如果ORACLE是10g则需要做如下配置

? <property name="dependContent" type="text"? >
??????????? <column name="DEPEND_CONTENT" />
??</property>

?实体中的属性dependContent则要定义为String类型的

?

?

?

读书人网 >软件架构设计

热点推荐