MrRazia
MrRazia
DTDrizzle Team
Created by magicspon on 7/4/2024 in #help
How to query many to many? Are the docs out of date?
See if it helps to add a relation name to the relations. The related relations should have the same name to associate it. eg:
export const eventsRelations = relations(events, ({ many }) => ({
drinks: many(eventsToDrinks, relationName: 'eventToDrinks'),
}))
export const eventsRelations = relations(events, ({ many }) => ({
drinks: many(eventsToDrinks, relationName: 'eventToDrinks'),
}))
7 replies