its possible to remove fields from the return pris...
# orm-help
m
its possible to remove fields from the return prisma.model.findFirst (like remove password) ?
✅ 1
m
Hi, I needed that some times ago, I selected the fields i need with
select
:
Copy code
//...
select: {
  id: true,
  email: true,
  validationToken: true,
},
//...
m
so you can only specify the fields that you want to add but you cannot just say reove x field?
m
I think so. I never saw such option to omit fields…
m
ok, well seems I will have to do have a huge select 😕 ; hopefully they add the feature in the future
a
Here is the official feature request, feel free to add a 👍 or your specific use case!
m
the proposal seems ok... just let user explicitly tell what they want to remove instead of having to tell what they want from the model... for large models its a bit cumbersome
plus one +1 1
a
How about using middleware? You can delete those fields for all queries