Skip to content

Fix BulkLoader indexing with Stringable primary keys#557

Merged
roxblnfk merged 1 commit into2.xfrom
fix-bulk-loader-stringable-keys
Mar 5, 2026
Merged

Fix BulkLoader indexing with Stringable primary keys#557
roxblnfk merged 1 commit into2.xfrom
fix-bulk-loader-stringable-keys

Conversation

@roxblnfk
Copy link
Member

@roxblnfk roxblnfk commented Mar 5, 2026

🔍 What was changed

Fix BulkLoader crash when primary key uses Stringable typecast without uncast

When a typecast handler implements only CastableInterface (no UncastableInterface), mapper->uncast() returns PK values as Stringable objects. BulkLoader::indexEntity() rejected them via is_scalar() check.

Now both indexEntity() and getEntity() cast Stringable objects to string for array key indexing.

📝 Checklist

  • How was this tested:
    • Unit tests added

@roxblnfk roxblnfk added this to the 2.14.x milestone Mar 5, 2026
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.80%. Comparing base (2c06029) to head (8f3fbb3).
⚠️ Report is 1 commits behind head on 2.x.

Additional details and impacted files
@@             Coverage Diff              @@
##                2.x     #557      +/-   ##
============================================
+ Coverage     91.75%   91.80%   +0.04%     
- Complexity     1965     1966       +1     
============================================
  Files           131      131              
  Lines          5036     5039       +3     
============================================
+ Hits           4621     4626       +5     
+ Misses          415      413       -2     

☔ 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.

@roxblnfk roxblnfk merged commit c6d621b into 2.x Mar 5, 2026
28 of 30 checks passed
@roxblnfk roxblnfk deleted the fix-bulk-loader-stringable-keys branch March 5, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant