Skip to content
Source
Sign inSign up
TanStack/db

Fix optimized join missing results #501

Mergedkevin-dp(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/501/headmerged by KyleAMathews

Showing 4 changed files with 80 additions and 4 deletions (loading 1).

x
0 of 4 viewed, 4 left
5 additions and 0 deletions.changeset/thin-rings-flow.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+"@tanstack/db": patch
+---
+​
+Fixes a bug where optimized joins would miss data
1 addition and 4 deletionspackages/db/src/query/compiler/joins.tsModified
View file
@@ -208,13 +208,10 @@
? (joinedExpr as PropRef)
: (mainExpr as PropRef)
​
- const activeColl =
- activeCollection === `main` ? collections[mainTableId]! : lazyCollection
-​
const followRefResult = followRef(
rawQuery,
lazyCollectionJoinExpr,
- activeColl
+ lazyCollection
const followRefCollection = followRefResult.collection
​