|
Hi Chris, thanks for the very detailed investigation! On the Dialect: there is a specific Dialect for SQL Server 2008: org.hibernate.dialect.SQLServer2008Dialect. You could try hacking some changes to it? You can either checkout the source code for Hibernate ORM or extend it, then enable your custom Dialect using configuration properties.
An interesting tidbit is that Oracle generates a SQL statement like the following:
You mean that is being generated by the Hibernate Dialect for Oracle, right? Could you verify which exact Dialect implementations are being compared? That should make it easier to identify which code should be ported from one to the other.
Did you not state initially that the generated SQL was fine, as tested in the console? Wondering if you're hitting a driver bug (which driver are you using now?) as the kind of generated SQL should not affect internal complexity in ORM.
|