File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
runtime/src/enhancements/node Expand file tree Collapse file tree 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 {
902902 } else {
903903 // translate to plain `update` for nested write into base fields
904904 const findArgs = {
905- where : clone ( args . where ) ,
905+ where : clone ( args . where ?? { } ) ,
906906 select : this . queryUtils . makeIdSelection ( model ) ,
907907 } ;
908908 await this . injectUpdateHierarchy ( db , model , findArgs ) ;
@@ -1095,7 +1095,7 @@ export class DelegateProxyHandler extends DefaultPrismaProxyHandler {
10951095 private async doDeleteMany ( db : CrudContract , model : string , where : any ) : Promise < { count : number } > {
10961096 // query existing entities with id
10971097 const idSelection = this . queryUtils . makeIdSelection ( model ) ;
1098- const findArgs = { where : clone ( where ) , select : idSelection } ;
1098+ const findArgs = { where : clone ( where ?? { } ) , select : idSelection } ;
10991099 this . injectWhereHierarchy ( model , findArgs . where ) ;
11001100
11011101 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
10901090
10911091 // convert upsert to update
10921092 const convertedUpdate = {
1093- where : args . where ,
1093+ where : args . where ?? { } ,
10941094 data : this . validateUpdateInputSchema ( model , args . update ) ,
10951095 } ;
10961096 this . mergeToParent ( context . parent , 'update' , convertedUpdate ) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,11 @@ datasource db {
9696
9797generator js {
9898 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+ }
100104}
101105
102106plugin enhancer {
You can’t perform that action at this time.
0 commit comments