createSQLQuery.addJoin sometimes doesn't work correctly
-------------------------------------------------------
Key: HHH-2239
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2239
Project: Hibernate3
Type: Bug
Components: query-sql
Reporter: Stoyan Stoyanov
Sorry, I have no enough time for details now. I will give you just a hint.
The bug is in method:
private String SQLQueryParser.substituteBrackets() throws QueryException {
....
else {
String aliasName = aliasPath.substring(0, firstDot);
int collectionIndex = Arrays.binarySearch(collectionAliases, aliasName);
boolean isCollection = collectionIndex>-1;
boolean isEntity = isEntityAlias(aliasName);
....
}
As you can see in the code Arrays.binarySearch. The member 'collectionAliases' is
NOT sorted. The 'collectionAliases' order depends on (1) SQLQuery.addJoin order
calls in application code and (2) the dependences between "joined" items.
'collectionAliases' member is passed as SQLQueryParser a NOT sorted contructor
parameter.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira