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 ?

2
  • 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 blog.xebia.com/2009/11/… Commented Jul 4, 2011 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: forum.hibernate.org/… Commented Jul 4, 2011 at 15:04

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.