Skip to content

Commit

Permalink
Merge pull request #1343 from olup/fix-model-loaders
Browse files Browse the repository at this point in the history
fix: drizzle plugin model loader when multiple models are requested
  • Loading branch information
hayes authored Nov 12, 2024
2 parents 8794a12 + c71b6bd commit 20f9ae0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tasty-mails-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@pothos/plugin-drizzle": patch
---

fix: drizzle plugin model loader when multiple models are requested
2 changes: 1 addition & 1 deletion packages/plugin-drizzle/src/model-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export class ModelLoader {
...selectionToQuery(selection),
where: inArray(
this.selectSQL,
[entry.models.keys()].map(([model]) => this.sqlForModel(model)),
[...entry.models.keys()].map((model) => this.sqlForModel(model)),
),
});

Expand Down

0 comments on commit 20f9ae0

Please sign in to comment.