Allow override deleted field in findUnique and findUniqueOrThrow
The existing findFirst and findFirstOrThrow already have this override logic:
{
...
where: {
...params.args?.where,
// allow overriding the deleted field in where
[config.field]:
params.args?.where?.[config.field] || config.createValue(false),
},
...
}
But findUnique and findUniqueOrThrow don't have it. The findUnique and findUniqueOrThrow called findFirst and findFirstOrThrow internally but the override params not passed to the internal call.
This PR try to fix this issue.
Allow override deleted field in
findUnique
andfindUniqueOrThrow
The existing
findFirst
andfindFirstOrThrow
already have this override logic:But
findUnique
andfindUniqueOrThrow
don't have it. ThefindUnique
andfindUniqueOrThrow
calledfindFirst
andfindFirstOrThrow
internally but the override params not passed to the internal call. This PR try to fix this issue.