Skip to content

Commit

Permalink
fix: passing connection debug flag to relationships loaded via model …
Browse files Browse the repository at this point in the history
…instance

Fixes: #950, #963
  • Loading branch information
thetutlage committed Dec 14, 2023
1 parent 45cad2e commit b44d15e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/orm/base_model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1734,9 +1734,12 @@ class BaseModelImpl implements LucidRow {
preloader.load(relationName, callback)
}

const queryClient = Model.$adapter.modelClient(this)

await preloader
.sideload(this.$sideloaded)
.processAllForOne(this, Model.$adapter.modelClient(this))
.debug(queryClient.debug)
.processAllForOne(this, queryClient)
}

/**
Expand Down

0 comments on commit b44d15e

Please sign in to comment.