File tree 3 files changed +8
-4
lines changed
runtime/src/enhancements/node
3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -902,7 +902,7 @@ export class DelegateProxyHandler extends DefaultPrismaProxyHandler {
902
902
} else {
903
903
// translate to plain `update` for nested write into base fields
904
904
const findArgs = {
905
- where : clone ( args . where ) ,
905
+ where : clone ( args . where ?? { } ) ,
906
906
select : this . queryUtils . makeIdSelection ( model ) ,
907
907
} ;
908
908
await this . injectUpdateHierarchy ( db , model , findArgs ) ;
@@ -1095,7 +1095,7 @@ export class DelegateProxyHandler extends DefaultPrismaProxyHandler {
1095
1095
private async doDeleteMany ( db : CrudContract , model : string , where : any ) : Promise < { count : number } > {
1096
1096
// query existing entities with id
1097
1097
const idSelection = this . queryUtils . makeIdSelection ( model ) ;
1098
- const findArgs = { where : clone ( where ) , select : idSelection } ;
1098
+ const findArgs = { where : clone ( where ?? { } ) , select : idSelection } ;
1099
1099
this . injectWhereHierarchy ( model , findArgs . where ) ;
1100
1100
1101
1101
if ( this . options . logPrismaQuery ) {
Original file line number Diff line number Diff line change @@ -1090,7 +1090,7 @@ export class PolicyProxyHandler<DbClient extends DbClientContract> implements Pr
1090
1090
1091
1091
// convert upsert to update
1092
1092
const convertedUpdate = {
1093
- where : args . where ,
1093
+ where : args . where ?? { } ,
1094
1094
data : this . validateUpdateInputSchema ( model , args . update ) ,
1095
1095
} ;
1096
1096
this . mergeToParent ( context . parent , 'update' , convertedUpdate ) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,11 @@ datasource db {
96
96
97
97
generator js {
98
98
provider = 'prisma-client-js'
99
- ${ options . previewFeatures ? `previewFeatures = ${ JSON . stringify ( options . previewFeatures ) } ` : '' }
99
+ ${
100
+ options . previewFeatures
101
+ ? `previewFeatures = ${ JSON . stringify ( options . previewFeatures ) } `
102
+ : 'previewFeatures = ["strictUndefinedChecks"]'
103
+ }
100
104
}
101
105
102
106
plugin enhancer {
You can’t perform that action at this time.
0 commit comments