[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-530?page=co...
]
Shawn Clowater commented on HHH-530:
------------------------------------
Steve, your timing is impeccable as I went back to the well and started playing with this
quite a bit.
I expanded the DynamicFilterTest to include the same queries I did on the Criteria side
and mimiced them in HQL to initially verify that they failed due to the filter not being
applied at all. I then commented out that line of code in the JoinProcessor and some of
them started to work. It wasn't apparent at first but in some cases the values were
being bound in the incorrect order and for the longest time I couldn't figure why.
I then noticed the bindParameterValues was being overridden and that is where the new
problem lies. It is making the same assumption that the QueryParameters used to, that
being that all of the filter parameters are at the start of the query as it tries to
process the filters first and then apply the remaining parameters as it was processed from
the ASTParser.
At first I just commented that out and it worked fine for the tests that I wrote but then
broke some of the tests in ASTParsingLoaderTest (it's never easy). I've got it
somewhat working right now (very dirty) but I am going to write a few more tests and then
see if it still holds. I want to try a mix/match of named/positional with hql and filters
enabled and see what happens (I think it'll fail with what I currently have)
I'll post everything up once I'm done, I did find a bit of a bug in my Criteria
side of the handling, i.e. I can still hit a class cast when trying to cast the Criteria
to a CriteriaImpl in the case of a nested subquery but I think I have a fix for that as
well. Looking back through the comments it would appear that I thought I had that fixed
at some point but I either uploaded the wrong patch and/or interpreted my results
correctly as it didn't work.
Allow application of filters on subqueries
------------------------------------------
Key: HHH-530
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-530
Project: Hibernate Core
Issue Type: Patch
Components: core
Reporter: Gavin King
Assignee: Steve Ebersole
Fix For: 3.3.x
Attachments: HHH-530.3.3.SP1.patch, HHH-530.Additional.Subquery.patch,
HHH-530.patch, hibernate_filter_fix-3.0.5.patch, hibernate_filter_fix-3.0.5_14.patch,
SubqueriesWithFiltersTest.patch
Currently filter conditions are applied in subselects, they should not be.
--
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