4

I try to create a hibernate mapping for an oracle database. The datebase is pretty old from before oracle 8 but is now on 10. Hibernate reverse engineering balks at a long raw column. This datatype is deprecated and should be converted to blob.

But this is not my database. If the customer refuses to convert how would a hibernate mapping look like ?

openCage
  • 2,735
  • 1
  • 18
  • 24
  • Did you try to map it manually to anything? I guess you should be able to map it to java.sql.Blob; If you that fails, you must be able to map it to a UserType. see this http://blog.xebia.com/2009/11/understanding-and-writing-hibernate-user-types/ – bpgergo Jul 04 '11 at 15:01
  • I've just googled it and it according to Hibernate team member steve, it is possible to map it to String. link: https://forum.hibernate.org/viewtopic.php?p=2203393&sid=a5c018868dabdb11ca878fb30946ce19 – bpgergo Jul 04 '11 at 15:04

1 Answers1

9

Try mapping it to byte[].

If you get java.sql.SQLException: Stream has already been closed, then try setting useFetchSizeWithLongColumn = true in the connection properties for the OJDBC driver. See the OracleDriver API

antyrat
  • 27,479
  • 9
  • 75
  • 76
Pablo
  • 1,604
  • 16
  • 31