[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2985?page=c...
]
Shawn Clowater commented on HHH-2985:
-------------------------------------
http://opensource.atlassian.com/projects/hibernate/browse/HHH-530 should be enough of a
test to illustrate this. However, the way i have it implemented has a bug in that it only
works for one level deep.
As per my comments in the other issue:
"However, I found an issue with the way I'm getting at the filters to pass to the
CriteriaJoinWalker. I'm casting the criteria to a CriteriaImpl to get at the session
but in the nested subquery it's no longer a CriteriaImpl it is a
CriteriaImpl$Subcriteria.
There doesn't seem to be a mechanism right now to be able to get at that in all cases,
the parent criteria on the Subcriteria doesn't have a reference to the actual session
(it was null when I tried it)."
Patch to HHH-952 should propagate enabledFilters
------------------------------------------------
Key: HHH-2985
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2985
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5
Reporter: Céline Launay
Original Estimate: 1 hour
Remaining Estimate: 1 hour
The patch submitted for issue HHH-952 reads like so :
// patch to generate joins on subqueries stolen from CriteriaLoader
CriteriaJoinWalker walker = new CriteriaJoinWalker(persister,
innerQuery, factory, criteriaImpl, criteriaImpl
.getEntityOrClassName(), new HashMap()) {
// need to override default of "this_" to whatever the innerQuery is using
protected String generateRootAlias(final String description) {
return innerQuery.getRootSQLALias();
}
};
Note how it passes a new HashMap as filters. Wouldn't it be better to propagate
session.getEnabledFilters(), like so :
// patch to generate joins on subqueries stolen from CriteriaLoader
CriteriaJoinWalker walker = new CriteriaJoinWalker(persister,
innerQuery, factory, criteriaImpl, criteriaImpl
.getEntityOrClassName(), session.getEnabledFilters()) {
// need to override default of "this_" to whatever the innerQuery is using
protected String generateRootAlias(final String description) {
return innerQuery.getRootSQLALias();
}
};
--
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