one-to-one non-lazy loading but Filters Not Applied.
----------------------------------------------------
Key: HHH-4026
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4026
Project: Hibernate Core
Issue Type: Patch
Components: core
Affects Versions: 3.3.2, 3.3.1, 3.3.0.SP1, 3.3.0.GA, 3.3.0.CR2, 3.3.0.CR1, 3.2.7,
3.2.6
Environment: Hibernate 3.2.6
Reporter: Sandeep Vaid
Attachments: EntityJoinWalker.java
While fetching one-to-one association, filters are not applied.
I have modified the hibernate code to resolve this issue. With these changes, if filters a
are enabled for one-to-one associations,
they will be applied (appear in sql) else not.
Changes Done:
A) In EntityJoinWalker.java >> constructor:line 40
Current Code:
StringBuffer whereCondition = whereString( getAlias(), uniqueKey, batchSize )
//include the discriminator and class-level where, but not filters
.append( persister.filterFragment( getAlias(), Collections.EMPTY_MAP ) );
Changed Code:
StringBuffer whereCondition = whereString( getAlias(), uniqueKey, batchSize );
//include the discriminator and class-level where, but not filters
String filter= persister.filterFragment( getAlias(), enabledFilters);
whereCondition.insert( 0, StringHelper.moveAndToBeginning(filter) );
--
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