In the last few days i tried to upgrade an application with an pretty old hibernate3 version to the current hibernate4. It has quite a few entites with LOBs and updates/inserts don't work on such entites anymore. The problem of seems still to happen in our environment.
We use a SequenceIdentityGenerator for the ID columns and this seems to be the problem. I made a simpe test project to reproduce it.
The log looks like this for an insert (longText is the CLOB):
The problem should be this id-column
... and our own dialect based on Oracle10gDialect with this addition:
Also thanks to Danilo Ghirardelli for his test project, which this is based on.
Testet with Hibernate 4.1.9 and 4.2.0.CR2
Oracle 11g with ojdbc6.jar