if i change a model name in schema.prisma, how do ...
# orm-help
i
if i change a model name in schema.prisma, how do i get it to update? I tried to restart my nextjs app and everything but it says undefined
r
You need to run
prisma generate
i
alright thank you
another question, does the model name have to match the table in the db? sorry if that sounds dumb, im just new to this kinda thing
j
No, you can use
@@map
to use another name in the schema, and then map it to the underlying table.
i
alright thank you
how would I use findMany and add a limit?
await prisma.account.findMany({
  
where: {
    
email: user.email,
  
},
})
like in sql: `"SELECT * FROM 
accounts
 WHERE 
email
 = ? LIMIT 1"`
r
You can use
take
. I would suggest going through the docs on Prisma Client and it’s functionality 🙂