From 4dc1bb387ecb87df4b570f452c41b5cab19666f7 Mon Sep 17 00:00:00 2001 From: Ng Tze Yang Date: Thu, 27 Jun 2019 11:02:41 +0800 Subject: [PATCH] refact: pretti-fying ; --- src/Engine.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Engine.ts b/src/Engine.ts index 19be9a6..5da5fc9 100644 --- a/src/Engine.ts +++ b/src/Engine.ts @@ -419,7 +419,10 @@ function applyNamingStrategy( function changeColumnNames(model: EntityInfo[]) { model.forEach(entity => { entity.Columns.forEach(column => { - const newName = namingStrategy.columnName(column.tsName, column); + const newName = namingStrategy.columnName( + column.tsName, + column + ); entity.Indexes.forEach(index => { index.columns .filter(column2 => column2.name === column.tsName) @@ -453,7 +456,10 @@ function applyNamingStrategy( } function changeEntityNames(entities: EntityInfo[]) { entities.forEach(entity => { - const newName = namingStrategy.entityName(entity.tsEntityName, entity); + const newName = namingStrategy.entityName( + entity.tsEntityName, + entity + ); entities.forEach(entity2 => { entity2.Columns.forEach(column => { column.relations.forEach(relation => {