Skip to content
Discussion options

You must be logged in to vote

You have fields and references backwards:

export const usersRelations = relations(users, ({ one }) => ({
  students: one(users, {
    fields: [users.id],
    references: [students.userId],
  }),
}));

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Angelelz
Comment options

Answer selected by masterbater
@masterbater
Comment options

@masterbater
Comment options

@masterbater
Comment options

@Angelelz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants