I am creating a user with name, email and passwd u...
# orm-help
l
I am creating a user with name, email and passwd using prisma with mongodb and using the @unique directive on email field in datamodel.prisma doesn't seem to throw any errors when creating multiple users with the same email. Any ideas why?
p
Did you check if there is a user associated with that email in the database? I haven't had this issue, it always threw error when registering with multiple email.
h
Make sure that you are not using embedded fields
l
Hi Panthar, I don't think the following Type is embedded is it?
type User { id: ID! @id name: String! email: String! @unique password: String! resetToken: String resetTokenExpiry: String permissions: [Permission] }
h
Lets talk in the DM