What's the best way to associate NextAuth's models to other tables with Sequelize? #4731
Unanswered
RustyNova016
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am wondering how should I do to insert those associations. I tried to extract the user model like so:
const user = sequelize.define("user", { ...models.User, });
// Do association on the model here
export const AuthDBAdapter = SequelizeAdapter(sequelize, { models: { User: user } });
But the type of the user variable doesn't match the type needed for the user model of the adapter. Is there anyway to fix it?
Beta Was this translation helpful? Give feedback.
All reactions