File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
libs/json-api/json-api-nestjs-microorm/src/lib Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -77,15 +77,15 @@ export class Users {
7777 @Property ( {
7878 name : 'is_active' ,
7979 type : 'boolean' ,
80- nullable : true ,
80+ nullable : false ,
8181 default : false ,
8282 } )
8383 public isActive ! : boolean ;
8484
8585 @Property ( {
8686 name : 'test_date' ,
8787 type : Date ,
88- nullable : true ,
88+ nullable : false ,
8989 defaultRaw : 'CURRENT_TIMESTAMP(0)' ,
9090 columnType : 'timestamp(0) without time zone' ,
9191 } )
Original file line number Diff line number Diff line change @@ -72,7 +72,11 @@ export const getPropsNullable = <E extends object>(
7272 . map ( ( i ) => {
7373 // @ts -ignore
7474 const props = entityMetadata . properties [ i ] ;
75- return props . nullable || props . default !== undefined ? i : false ;
75+ return props . nullable ||
76+ props . default !== undefined ||
77+ props . defaultRaw !== undefined
78+ ? i
79+ : false ;
7680 } )
7781 . filter ( ( i ) => ! ! i ) as unknown as EntityParam < E > [ 'propsNullable' ] ;
7882} ;
You can’t perform that action at this time.
0 commit comments