Is there a way to validate foreign keys during a f...
# orm-help
m
Is there a way to validate foreign keys during a findMany invocation without
include
? Imagining I have users with posts:
Copy code
const posts = await prisma.post.findMany({
     where: {
         userId,
    } 
  });
will return 0 whether a user with the given id exists. I'd like to differentiate between "no posts for this user" and "this user doesn't exist".