@@ -71,8 +71,8 @@ export function FilterRepositoryMixin<
71
71
> ( config : {
72
72
models : (
73
73
context : InvocationContext ,
74
- models : DataObject < T > [ ]
75
- ) => Promise < ( DataObject < T > | undefined ) [ ] > ;
74
+ entities : DataObject < T > [ ]
75
+ ) => Promise < DataObject < T > [ ] > ;
76
76
where : ( context : InvocationContext , where : Where < T > ) => Promise < Where < T > > ;
77
77
fields : (
78
78
context : InvocationContext ,
@@ -99,11 +99,10 @@ export function FilterRepositoryMixin<
99
99
Array . from ( arguments )
100
100
) ;
101
101
102
- const mappedEntities : any [ ] = (
103
- await config . models ( filterContext , entities || [ ] )
104
- ) . filter ( ( entity ) => entity ) ;
105
-
106
- return await super . createAll ( mappedEntities , options ) ;
102
+ return await super . createAll (
103
+ await config . models ( filterContext , entities || [ ] ) ,
104
+ options
105
+ ) ;
107
106
} ;
108
107
109
108
/**
@@ -236,17 +235,17 @@ export function FilterRepositoryMixin<
236
235
Array . from ( arguments )
237
236
) ;
238
237
239
- const mappedModel = (
238
+ const mappedData = (
240
239
await config . models ( filterContext , [ data ] )
241
240
) [ 0 ] ;
242
- if ( ! mappedModel ) {
241
+ if ( ! mappedData ) {
243
242
return {
244
243
count : 0 ,
245
244
} ;
246
245
}
247
246
248
247
return await super . updateAll (
249
- mappedModel ,
248
+ mappedData ,
250
249
await config . where ( filterContext , where || { } ) ,
251
250
options
252
251
) ;
0 commit comments