Danilo Ghirardelli edited a comment on Bug HHH-4635

It seems there are two different versions of the same error code ORA-24816: one says simply that there is a non-LOB column (of any type, even numeric) after a LOB column, and the other says that there are more than 4000 bytes of data (in one or more columns) after a LOB column, which seems a bit more "tolerant". The second seems to be more common, maybe the first happens with older drivers (9 I would say) and the second with newer drivers (10/11), but I'm not completely sure.

Anyway, to patch this entirely in hibernate I think it should be something like this:

  • add a isLob attribute in the Property bean. It might be useful anyway, I don't know why that information is not available.
  • extend the Configuration.secondPassCompile to accept also SecondPass defined in the dialect.
  • add a specific SecondPass to the Oracle dialect that will re-order properties in the entityMapping pushing the Lobs at the end (by reflection or by wrapping the property iterator again).

What do you think?

By the way, this issue is still present in hibernate 3.6.10 and 4, so you should update the version tag...

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira