-
Notifications
You must be signed in to change notification settings - Fork 198
0.6.0 Includes with multiple toArray fails #1425
Copy link
Copy link
Open
Description
- [ x ] I've validated the bug against the latest version of DB packages
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
export const myCollection = createLiveQueryCollection({
getKey: x => x.id,
query: q => q
.from({ tf: parentCollection })
.select(({ tf }) => ({
id: tf.id,
nodesA: toArray(q
.from({ n: flowCollection })
.where(({ n }) => eq(n.id, tf.flow_id))),
nodesB: toArray(q
.from({ n: flowCollection })
.where(({ n }) => eq(n.id, tf.flow_id))),
...Both nodesA and nodesB should be an array of 1 item.
In the example above I get:
{
"id": "e31ac544-9b50-4324-baa5-b4c836ed4cee",
"nodesA": [ { ... } ],
"nodesB": [], <------ missing data
"$synced": true,
"$origin": "remote",
"$key": "e31ac544-9b50-4324-baa5-b4c836ed4cee",
"$collectionId": "live-query-7"
}If I remove nodesA from the query, I get:
{
"id": "e31ac544-9b50-4324-baa5-b4c836ed4cee",
"nodesB": [ { ... } ],
"$synced": true,
"$origin": "remote",
"$key": "e31ac544-9b50-4324-baa5-b4c836ed4cee",
"$collectionId": "live-query-7"
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels