Hi All,
It is interesting.
My opinion and investigation:
- Oralce strongly recommend not to use LONG datatype in oracle, especially above oracle 8.LONG type is just for backward compatibility.
And the use of LONG datatype is subject to many restrictions.
-
- like Hanjin said, the LONG column cannot appear in WHERE clasuses.
- A table can contain only one LONG column , although this is not a problem for us now.
- …
- Hibernate doesn’t come with the support of manipulation for CLOB column. It is difficult to deal with those CLOB column.( http://www.hibernate.org/76.html and http://www.hibernate.org/56.html)
Typically, we can creat a new type to get/set CLOB value.
But dear spring has already invented a wheel – org.springframework.orm.hibernate3.support.ClobStringType.
If interested with it, you can look into its source code.
I checked in the updated codes (***.hbm.xml and applicationContext-hibernate.xml), FYI.
Best regards,
Dan
Attached zip file contains some related articles.
oracle-clob-long-in-hibernate.zip