-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
bug/fixed-in-betaThis bug has been fixed in beta (or will be soon).This bug has been fixed in beta (or will be soon).docsImprovements or additions to documentationImprovements or additions to documentationdocs/incorrectrqbrelational queriesrelational queries
Description
What version of drizzle-orm are you using?
0.33.0
What version of drizzle-kit are you using?
0.23.0
Describe the Bug
https://orm.drizzle.team/docs/rqb#foreign-keys
export const users = pgTable('users', {
id: serial('id').primaryKey(),
name: text('name'),
});
export const usersRelations = relations(users, ({ one, many }) => ({
profileInfo: one(users, { // the table is specified incorrectly
fields: [profileInfo.userId],
references: [users.id],
}),
}));
export const profileInfo = pgTable('profile_info', {
id: serial('id').primaryKey(),
userId: integer("user_id"),
metadata: jsonb("metadata"),
});Expected behavior
No response
Environment & setup
No response
sromexs and zhukovskyi-v
Metadata
Metadata
Assignees
Labels
bug/fixed-in-betaThis bug has been fixed in beta (or will be soon).This bug has been fixed in beta (or will be soon).docsImprovements or additions to documentationImprovements or additions to documentationdocs/incorrectrqbrelational queriesrelational queries


