-
Notifications
You must be signed in to change notification settings - Fork 934
ApplyFilter does not work on join statements in LINQ #2549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milestone
Comments
Can you check how it works with latest 5.4 dev build? |
I works correctly with NHibernate 5.4.0-dev.3147. |
Good. Thanks for report |
Would it be better to add Active Filters in HasMany Relations by default? Why do we force adding filters with "ApplyFilter" ? |
hazzik
pushed a commit
that referenced
this issue
Sep 18, 2020
bahusoid
added a commit
to bahusoid/nhibernate-core
that referenced
this issue
Aug 10, 2021
This was referenced Apr 24, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
We upgraded NH from 5.2.7 to 5.3.3.
After upgrade we had an issue that ApplyFilter does not work with joins.
Same join statement working fine with version 5.2.7.
You can find testcase implementation below link.
https://github.com/esabah/NHibernateBugTest/blob/master/NHibernateBugTest/TxnDefTest.cs
TxnDefMember entity has a custom filter which applies filter on mbrId field.
ApplyFilter<MemberConditionFilter>();
But mbrId not included in sql query in 5.3.3 version.
(from txndef in session.Query<TxnDef>() join txnDefMember in session.Query<TxnDefMember>() on txndef.Guid equals txnDefMember.Id.TxnDefGuid select txnDefMember.BucketName)
same query returns 8 records in 5.3.3
and returns 4 records in 5.2.7
The text was updated successfully, but these errors were encountered: