fix(db-postgres): relationship query pagination (#5802)

This commit is contained in:
Dan Ribbens
2024-04-11 15:37:19 -04:00
committed by GitHub
parent c0ba6cc19a
commit 65690a675c
2 changed files with 162 additions and 20 deletions

View File

@@ -120,7 +120,7 @@ export const findMany = async function find({
const findPromise = db.query[tableName].findMany(findManyArgs)
if (pagination !== false && (orderedIDs ? orderedIDs?.length >= limit : true)) {
if (pagination !== false && (orderedIDs ? orderedIDs?.length <= limit : true)) {
const selectCountMethods: ChainedMethods = []
joinAliases.forEach(({ condition, table }) => {