Skip to content

修复关联查询中 当关联key值为 NULL 时出现异常情况 - #837

Merged
liu21st merged 2 commits into
top-think:4.0from
wolfcode-cn:4.0
Jan 31, 2026
Merged

修复关联查询中 当关联key值为 NULL 时出现异常情况#837
liu21st merged 2 commits into
top-think:4.0from
wolfcode-cn:4.0

fix(relations): handle null local key values in HasMany and HasOne re…

0774f22
Select commit
Loading
Failed to load commit list.
Codecov / codecov/project succeeded Jan 29, 2026 in 1s

52.00% (+0.00%) compared to 76eaf6e

View this Pull Request on Codecov

52.00% (+0.00%) compared to 76eaf6e

Details

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.00%. Comparing base (76eaf6e) to head (0774f22).

Files with missing lines Patch % Lines
src/model/relation/BelongsTo.php 0.00% 2 Missing ⚠️
src/model/relation/HasMany.php 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##                4.0     #837   +/-   ##
=========================================
  Coverage     52.00%   52.00%           
  Complexity     3530     3530           
=========================================
  Files            74       74           
  Lines          8311     8311           
=========================================
  Hits           4322     4322           
  Misses         3989     3989           

☔ View full report in Codecov by Sentry.
📢 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.