File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/runtime/src/client/crud/operations Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -883,10 +883,17 @@ export abstract class BaseOperationHandler<Schema extends SchemaDef> {
883883 return acc ;
884884 } , [ ] as string [ ] ) ;
885885 for ( const item of createData ) {
886+ if ( Object . keys ( item ) . length === allPassedFields . length ) {
887+ continue ;
888+ }
886889 for ( const field of allPassedFields ) {
887890 if ( ! ( field in item ) ) {
888891 const fieldDef = this . requireField ( model , field ) ;
889- if ( fieldDef . default !== undefined && typeof fieldDef . default !== 'object' ) {
892+ if (
893+ fieldDef . default !== undefined &&
894+ fieldDef . default !== null &&
895+ typeof fieldDef . default !== 'object'
896+ ) {
890897 item [ field ] = this . dialect . transformPrimitive (
891898 fieldDef . default ,
892899 fieldDef . type as BuiltinType ,
You can’t perform that action at this time.
0 commit comments