When I use the `upsert()` method as a `findorCreat...
# prisma-client
g
When I use the
upsert()
method as a
findorCreate
implementation, I get
{ count: 0 }
. This is only happening when a user is already in the database. Can someone tell me why this is happening? Below is a snippet of the method call.
Copy code
const user = await prisma.user.upsert({
	where: { email: profile.emails[0].value },
	update: {},
	create: {
        email: profile.emails[0].value,
		name: profile.displayName,
	},
});
l
maybe because the user already exists and you provided empty
update
field => 0 entities were changed ? just a guess, not confirmed personally