I just upgraded our application from Hibernate 3.3 to 3.6.1.Final and am now having problems getting large string storage working. We need a set of entity annotations that will work across all the major DBs but I'm stuck in a situation where I can either get things working in Oracle or PostgreSQL but not both.
With Oracle both the materialized_clob and clob types work but on PostgreSQL we get the following exception:
http://uportal.pastebin.com/VuhkChRN Annotating all of our get methods with @Transactional fixes the problem but we have some reservations about requiring a TX for every read-only operation.
With PostgreSQL things just work if I use the text type but then on Oracle it fails with:
http://uportal.pastebin.com/qujD3MFxWe were using the text type in 3.3 and it worked across all databases without any hiccups. How do I get this working in 3.6? We don't need schema compatibility between versions of our application we just need a single entity configuration that works to store a long String field across all the major DBs.