Skip to content

Fix nested left join null mapping#5750

Open
nhatlong90 wants to merge 1 commit into
drizzle-team:mainfrom
nhatlong90:fix-nested-left-join-nullify
Open

Fix nested left join null mapping#5750
nhatlong90 wants to merge 1 commit into
drizzle-team:mainfrom
nhatlong90:fix-nested-left-join-nullify

Conversation

@nhatlong90
Copy link
Copy Markdown

Fixes #1603.

This updates nested result mapping so a nullable joined object is only nullified when all selected fields from that joined table are null. Previously, if the first nested field was null, the mapper could nullify the whole object even when later fields from the same table had values.

Tests:

  • corepack pnpm --dir drizzle-orm exec vitest run tests/utils.test.ts

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.

[BUG]: Nested Partial Select returns null on left join if first column value is null

1 participant