File tree Expand file tree Collapse file tree 2 files changed +1
-18
lines changed
Expand file tree Collapse file tree 2 files changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ module.exports = class Flattener {
274274
275275 const modelFields = ( Interface . Schemas . schemas [ modelName ] ?. fields || [ ] ) ;
276276 const flattenedFields = modelFields
277- . filter ( ( field ) => this . _isFieldFlattened ( field . field ) && ! Array . isArray ( field . type ) ) ;
277+ . filter ( ( field ) => this . _isFieldFlattened ( field . field ) ) ;
278278
279279 return flattenedFields . map ( ( field ) => this . splitOnSeparator ( field . field ) ) ;
280280 }
Original file line number Diff line number Diff line change @@ -957,15 +957,6 @@ describe('service > Flattener', () => {
957957 [ 'engine' , 'horsePower' ] ,
958958 [ 'engine' , 'identification' , 'manufacturer' ] ,
959959 [ 'engine' , 'owner' ] ,
960- ] ) ;
961- } ) ;
962-
963- it ( 'should not take has many relationships into account' , ( ) => {
964- expect . assertions ( 1 ) ;
965-
966- const nestedPaths = Flattener . generateNestedPathsFromModelName ( 'cars' ) ;
967-
968- expect ( nestedPaths ) . not . toContain ( [
969960 [ 'engine' , 'partners' ] ,
970961 ] ) ;
971962 } ) ;
@@ -1029,14 +1020,6 @@ describe('service > Flattener', () => {
10291020 expect ( sampleCar [ 'engine@@@identification@@@manufacturer' ] ) . toStrictEqual ( '5fd78361f8e514b2abe7044b' ) ;
10301021 } ) ;
10311022
1032- it ( 'should not flattened has many relationship' , ( ) => {
1033- expect . assertions ( 1 ) ;
1034-
1035- Flattener . flattenRecordsForExport ( 'cars' , [ sampleCar ] ) ;
1036-
1037- expect ( sampleCar [ 'engine@@@partners' ] ) . toBeUndefined ( ) ;
1038- } ) ;
1039-
10401023 it ( 'should not change non flattened fields' , ( ) => {
10411024 expect . assertions ( 1 ) ;
10421025
You can’t perform that action at this time.
0 commit comments