why does it work by sorting by false but not by true?

i am certain i have one of each and it works when on false but i dont get anything back when its on true even though i have 2 rows in the table with it true
const results = await db.query.workouts.findMany({
orderBy: [desc(weights.id)],
limit: 20,
with: {
user: {
columns: {
name: true,
id: true
}
},
days: true
},
where: eq(workouts.public, true)
})
const results = await db.query.workouts.findMany({
orderBy: [desc(weights.id)],
limit: 20,
with: {
user: {
columns: {
name: true,
id: true
}
},
days: true
},
where: eq(workouts.public, true)
})
1 Reply
Angelelz
Angelelz14mo ago
Please clarify, what is being sorted by true? Can you show your table definitions?
Want results from more Discord servers?
Add your server