Harrie
DTDrizzle Team
•Created by Harrie on 12/3/2023 in #help
Postgres 'with' returns null with basic setup?
Classic user error. Issue was:
export const usersRelations = relations(users, ({ one }) => ({
team: one(teams, {
fields: [users.id],
references: [teams.id],
}),
}));
should be
export const usersRelations = relations(users, ({ one }) => ({
team: one(teams, {
fields: [users.teamId],
references: [teams.id],
}),
}));
I need to sleep 😄
3 replies