Mr.Propre
Mr.Propre
Explore posts from servers
DTDrizzle Team
Created by Mr.Propre on 11/30/2023 in #help
relation select query with where condition
export const usersTasksRelations = relations(usersTasks, ({ one }) => ({
users: one(users, {
fields: [usersTasks.userId],
references: [users.userId],
}),
tasks: one(tasks, {
fields: [usersTasks.taskId],
references: [tasks.id],
}),
}));
export const usersTasksRelations = relations(usersTasks, ({ one }) => ({
users: one(users, {
fields: [usersTasks.userId],
references: [users.userId],
}),
tasks: one(tasks, {
fields: [usersTasks.taskId],
references: [tasks.id],
}),
}));
20 replies
DTDrizzle Team
Created by Mr.Propre on 11/30/2023 in #help
relation select query with where condition
i didn't read you comment the first time, sorry 😅
20 replies
DTDrizzle Team
Created by Mr.Propre on 11/30/2023 in #help
relation select query with where condition
in their example it clearly is possible
20 replies
DTDrizzle Team
Created by Mr.Propre on 11/30/2023 in #help
relation select query with where condition
this is exactly what i saw and it confused me
20 replies
DTDrizzle Team
Created by Mr.Propre on 11/30/2023 in #help
relation select query with where condition
too many loops just to reformat the result array 😅
20 replies
DTDrizzle Team
Created by Mr.Propre on 11/30/2023 in #help
relation select query with where condition
i have the same solution right now, but it's kind of ugly
20 replies
DTDrizzle Team
Created by Mr.Propre on 11/30/2023 in #help
relation select query with where condition
the error says Object literal may only specify known properties, and where does not exist in type
20 replies
DTDrizzle Team
Created by Mr.Propre on 11/30/2023 in #help
relation select query with where condition
the problem here is that where: isNull(tasks.parentId) is an error
20 replies
DTDrizzle Team
Created by Mr.Propre on 11/23/2023 in #help
Drizzle error instance
im using mysql, so i guess i should check error coming form here ??
5 replies