With criteria API, order of differents #createAlias is not completely respected :
- when sql query is build OUTER|INNER JOIN are made in order that properties are declared in Entity
- if withClause is used in 2 #createAlias calls, param in query are mapped to their values in same order as #createAlias calls and not in order that properties are declared in Entity.
It results that attached test case fails with current version of hibernate (actually 4.1.7.Final).
To avoid this issue and, for performance purpose, to control OUTER|INNER JOIN order, I've made a patch which respect #createAlias calls order.
I hope that this could be merge in future version.
PHaroZ
PS : this is my first use of gralde, git and JUnit, so hope I've not done any mistake
|