Skip to content

Use CLR property name in soft-delete and multi-tenant filters#25568

Merged
maliming merged 3 commits into
rel-10.5from
liming/fix-soft-delete-filter-property-name
Jun 8, 2026
Merged

Use CLR property name in soft-delete and multi-tenant filters#25568
maliming merged 3 commits into
rel-10.5from
liming/fix-soft-delete-filter-property-name

Conversation

@maliming

@maliming maliming commented Jun 6, 2026

Copy link
Copy Markdown
Member

CreateFilterExpression in AbpDbContext passed GetColumnName() to EF.Property<T>(e, "..."), but the second argument must be the CLR property name. Renaming IsDeleted / TenantId via HasColumnName(...) before the filter is registered (and with UseDbFunction = false) made the query fail to translate. Switched to IProperty.Name. Added regression tests for both interfaces.

@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 22.15190% with 123 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.38%. Comparing base (c2029c4) to head (0240f99).
⚠️ Report is 219 commits behind head on rel-10.5.

Files with missing lines Patch % Lines
...Filtering/FilterExpressionPropertyNameInspector.cs 0.00% 46 Missing ⚠️
...tering/SoftDelete_With_Custom_Column_Name_Tests.cs 0.00% 35 Missing ⚠️
...ering/MultiTenant_With_Custom_Column_Name_Tests.cs 0.00% 34 Missing ⚠️
...pEntityFrameworkCoreTestModuleWithoutDbFunction.cs 0.00% 6 Missing ⚠️
...kCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs 50.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           rel-10.5   #25568      +/-   ##
============================================
- Coverage     49.41%   49.38%   -0.03%     
============================================
  Files          3674     3682       +8     
  Lines        124053   124249     +196     
  Branches       9481     9494      +13     
============================================
+ Hits          61303    61363      +60     
- Misses        60911    61046     +135     
- Partials       1839     1840       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maliming maliming requested review from EngincanV and ebicoglu June 8, 2026 00:54
@maliming maliming added this to the 10.5-final milestone Jun 8, 2026
@maliming maliming removed the request for review from ebicoglu June 8, 2026 05:17
…elete-filter-property-name

# Conflicts:
#	framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/TestMigrationsDbContext.cs
#	framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/TestAppDbContext.cs
@maliming maliming merged commit 668a047 into rel-10.5 Jun 8, 2026
2 of 4 checks passed
@maliming maliming deleted the liming/fix-soft-delete-filter-property-name branch June 8, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants