---
title: "Hibernate 处理Oracle的大对象Clob"
author: "ztfjava"
date: "2010-10-12T08:20:16Z"
tags: []
categories: ["企业架构"]
slug: "hibernate-oracle-clob"
draft: false
lastmod: "2010-10-12T08:20:16Z"
id: 781990
url: "https://ztfjava.iteye.com/blog/781990"
---

Hibernate+Oracle+CLOB的读写其实只要这样做：

1.在Oracle里设置某字段为clob类型。
2.在Hibernate的配置文件里使用网上下载的Oracle 10g最新的jdbc驱动。
3.实体类里把clob字段对应的属性类型设置为String。
4.hibernate的映射文件*.hbm.xml里把该字段对应的类型该为text。