[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4026) one-to-one non-lazy loading but Filters Not Applied.
Steve Ebersole (JIRA)
noreply at atlassian.com
Tue Feb 2 11:11:29 EST 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35434#action_35434 ]
Steve Ebersole commented on HHH-4026:
-------------------------------------
also filters cannot be applied to many-to-one, you are mistaken
> 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.2.6, 3.2.7, 3.3.0.CR1, 3.3.0.CR2, 3.3.0.GA, 3.3.0.SP1, 3.3.1, 3.3.2
> Environment: Hibernate 3.2.6
> Reporter: Sandeep Vaid
> Assignee: Steve Ebersole
> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list