Here's one config to run Hibernate 3 & Oracle 10g byte[] / blob / thin with no coding required.
-JBoss 3.2.5
-JDK 1.4.2_06 (relevant for the JDBC driver, I guess)
Hibernate version:
3.0b2 (needs upgrading to a proper version but I don't think that's relevant, since this does seem to work...)
Mapping documents:
<property
name="docFileContents" type="binary">
<column name="FILE_CONTENTS" sql-type="blob"/>
</property>
hibernate.jdbc.use_streams_for_binary=true
(Make sure your config does set this property....)
Name and version of the database you are using:
- Oracle 10.1.0.2
- corresponding thin driver
- seems to be no 4k limit here
Hope this helps somebody skimming through 4k workarounds, OCI, UserTypes, contents turning into garbage, etc. stuff relevant for other versions/ requirements... No idea how this would perform, though, vs. other (UserType? Blob?) implementations, equal or worse. Will do some profiling anyways...
- BTW, I'm using Oracle9Dialect since there is none for 10g. Everything seems to run fine, and I suppose this dialect could take advantage of some new features in Oracle9 also present in 10g ? Should I to go back to generic OracleDialect to be safe?
|