fix: pass child where clauses to loadSubset in includes#1472
Merged
kevin-dp merged 5 commits intofix/on-demand-includesfrom Apr 14, 2026
Merged
fix: pass child where clauses to loadSubset in includes#1472kevin-dp merged 5 commits intofix/on-demand-includesfrom
kevin-dp merged 5 commits intofix/on-demand-includesfrom
Conversation
More templates
@tanstack/angular-db
@tanstack/browser-db-sqlite-persistence
@tanstack/capacitor-db-sqlite-persistence
@tanstack/cloudflare-durable-objects-db-sqlite-persistence
@tanstack/db
@tanstack/db-ivm
@tanstack/db-sqlite-persistence-core
@tanstack/electric-db-collection
@tanstack/electron-db-sqlite-persistence
@tanstack/expo-db-sqlite-persistence
@tanstack/node-db-sqlite-persistence
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/react-native-db-sqlite-persistence
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/tauri-db-sqlite-persistence
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
Contributor
|
Size Change: +19 B (+0.02%) Total Size: 114 kB 📦 View Changed
ℹ️ View Unchanged
|
Contributor
|
Size Change: 0 B Total Size: 4.24 kB ℹ️ View Unchanged
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
kevin-dp
added a commit
that referenced
this pull request
Apr 14, 2026
* Unit tests to check that includes are loaded lazily on-demand * Lazy load included rows in on-demand mode when index is available * ci: apply automated fixes * Fix type issue * changeset * fix: pass child where clauses to loadSubset in includes (#1472) * Unit tests to check that where clauses of included collections are passed * Unit tests to reproduce the problem with where clauses on included collections not being passed * Pass child where clauses to loadSubset * ci: apply automated fixes * changeset for child where clauses fix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
sourceWhereClausesinto the parent's map during includes compilation, so pure-child WHERE clauses (e.g.,eq(item.status, 'active')) are picked up by the child collection'sCollectionSubscriberand AND-combined with theinArraycorrelation filter inloadSubsetaliasToCollectionIdandaliasRemappingwere merged from the child compilation result —sourceWhereClauseswas silently droppedloadSubsetBuilds on #1471
Test plan
loadSubsetalongside correlation filterand()syntax combining correlation + child filter works🤖 Generated with Claude Code