fix(orm): preserve nested partial-select on left join when first field is null - #6178
Open
YtinuMoc wants to merge 2 commits into
Open
fix(orm): preserve nested partial-select on left join when first field is null#6178YtinuMoc wants to merge 2 commits into
YtinuMoc wants to merge 2 commits into
Conversation
…d is null Closes drizzle-team#1603. When the first column from a nullable left join is null but a later column from the same table is non-null, mapResultRow should keep the nested object instead of nullifying the whole object. Co-authored-by: Cursor <cursoragent@cursor.com>
…ial-select Regression test mirrors the reported logo-null / panelBackground-non-null left-join case from drizzle-orm#1603. Co-authored-by: Cursor <cursoragent@cursor.com>
YtinuMoc
force-pushed
the
fix/nested-partial-select-null-1603
branch
from
August 26, 2026 10:58
f2dee33 to
90277d3
Compare
Author
|
Verified `vitest run tests/utils.test.ts` on head `90277d36`: 3/3 pass (2026-08-26T11:40Z, pnpm/vitest 3.1.4). Mergeable, `behind_by=0`. /attempt + /claim #1603 posted; Algora $50 `clrpajuvw0004l40fv9obk8t8`. Ready for review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1603.
Summary
nullifyMapinmapResultRowso nested partial-select objects are not nullified when only the first joined column is nullutils.test.tsregression for mixed null/non-null joined fields and all-null joined fieldsValidation
pnpm exec vitest run drizzle-orm/tests/utils.test.ts(2 tests)/claim #1603
@algora-pbc /claim #1603