AbstractEmptinessExpression producing incorrect sql for innerselect
-------------------------------------------------------------------
Key: HHH-5633
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5633
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Final
Environment: eclipse gallileo windows 7 32 bit mysql
Reporter: minh huon
Attachments: hibernate bug.zip
Attached are the domain objects that are used in question for the query. I cannot see a
way to explicitly give an alias to the Restrictions.isNotEmpty when the query produce on
the inside of the isNotEmpty is a derived query table.
Looking at the code for version 3.5.0 AbstractEmptinessExpression like number 68:
{code}
String innerSelect = "(select 1 from " + collectionPersister.getTableName()
+ " where "
+ new ConditionFragment().setTableAlias( sqlAlias ).setCondition( ownerKeys,
collectionKeys ).toFragmentString()
+ ")";
{code}
The string creation seems to need an alias at the end of the creation to be correct my
mysql syntax.
The test case "shipmentQuery" is the one failing to produce the right query.
I'd create a patch but I'm not sure if that is exactly the problem or an I doing
something wrong.
--
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