[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1930?page=c...
]
Mike Ressler commented on HHH-1930:
-----------------------------------
Commented out HqlSqlWalker.handleWithFragment lines 362-364 in the trunk version this
evening and the TestCase passes. Since the version in trunk will change, the three lines
I commented out were:
if ( referencedFromElement != fromElement ) {
throw new InvalidWithClauseException( "with-clause expressions did not reference
from-clause element to which the with-clause was associated" );
}
If this is an acceptable fix for this bug, I'll create a patch file to apply to trunk.
Let me know if you'd like me to do anything else to verify this fix.
Other Notes:
It seems like the with clause should be able to refer to either part of the referenced
"from" element. I should be able to limit the sql results based on attributes
of either part of a join statement, not just the right hand side of the join. So this
begs the question, why is this check necessary?
I'm sure I'm missing something here, any comments would be appreciated.
QuerySyntaxException "with-clause expressions did not reference
from-clause element to which the with-clause was associated"
----------------------------------------------------------------------------------------------------------------------------
Key: HHH-1930
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1930
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.1.3, 3.2.0 cr1, 3.2.0.cr2, 3.2.0.cr3
Reporter: Manfred Geiler
Attachments: HibernateTestCase.zip
In Version 3.1.2 the following "EventManager" HQL query worked fine:
select p from Person p join p.emailAddresses as email with email = 'xyz'
and produced an SQL query like this:
select person0_.PERSON_ID as PERSON1_2_, person0_.age as age2_, person0_.firstname as
firstname2_, person0_.lastname as lastname2_
from PERSON person0_
inner join PERSON_EMAIL_ADDR emailaddre1_
on person0_.PERSON_ID=emailaddre1_.PERSON_ID and
(emailaddre1_.EMAIL_ADDR='xyz')
From Version 3.1.3 on this HQL throws the following QuerySyntaxException:
"with-clause expressions did not reference from-clause element to which the
with-clause was associated"
--
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