Drizzle ORM not updating type

Hi, I am trying to query one of my tables and trying to use the with clause to join other tables however the type for the query wont seem to update. Here are my relations code
export const listResourceRelation = relations(lists, ({ many }) => ({
resources: many(listResources, {
relationName: "listResources",
}),
}));
export const resourceListRelation = relations(listResources, ({ one }) => ({
list: one(lists, {
fields: [listResources.listId],
references: [lists.id],
relationName: "list",
}),
}));
export const listUserRelation = relations(lists, ({ one }) => ({
profile: one(profile, {
fields: [lists.userId],
references: [profile.userId],
relationName: "profile",
}),
}));
export const listResourceRelation = relations(lists, ({ many }) => ({
resources: many(listResources, {
relationName: "listResources",
}),
}));
export const resourceListRelation = relations(listResources, ({ one }) => ({
list: one(lists, {
fields: [listResources.listId],
references: [lists.id],
relationName: "list",
}),
}));
export const listUserRelation = relations(lists, ({ one }) => ({
profile: one(profile, {
fields: [lists.userId],
references: [profile.userId],
relationName: "profile",
}),
}));
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server