Danilo Ghirardelli edited a comment on Bug HHH-4635

I attached a workaround for the problem, in the file CustomOracleLocalSessionFactoryBean. It requires spring, hibernate 3.6 and annotation configuration but still I think it's something worth sharing. Use the CustomOracleLocalSessionFactoryBean instead of the standard LocalSessionFactoryBean in the bean definition, and leave all the configuration as is, this is just an extension of the original spring class.

After the mapping parsing is complete, this class will reorder the properties pushing the @Lob annontated elements (at the moment the xml configuration is not supported) to the end of the property list, so when queries are generated oracle will accept them. Obviously this will not solve all cases, but I think it will help in many cases without renaming properties or relying on luck. I don't know if this might be applied also for hibernate 4, I haven't tried.

If you negate the comparator in the class (swapping 1 and -1), the problem will be easier to reproduce.

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