From f1e61e8bf7b9ad07a355fd38f4e26d1b9c864e00 Mon Sep 17 00:00:00 2001 From: Kononnable Date: Thu, 1 Nov 2018 20:59:32 +0100 Subject: [PATCH] fixing printPropertyVisibility spaces --- src/entity.mst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entity.mst b/src/entity.mst index 52dd2b9..6834464 100644 --- a/src/entity.mst +++ b/src/entity.mst @@ -27,8 +27,8 @@ import {Index,Entity, PrimaryColumn, PrimaryGeneratedColumn, Column, OneToOne, O {{/relations}}{{#relations}} @{{relationType}}(type=>{{toEntityName relatedTable}}, {{toEntityName relatedTable}}=>{{toEntityName relatedTable}}.{{#if isOwner}}{{toPropertyName ownerColumn}},{ {{#../isPrimary}}primary:true,{{/../isPrimary}}{{^../is_nullable}} nullable:false,{{/../is_nullable}}{{#actionOnDelete}}onDelete: '{{.}}',{{/actionOnDelete}}{{#actionOnUpdate}}onUpdate: '{{.}}'{{/actionOnUpdate}} }{{else}}{{toPropertyName relatedColumn}}{{#if (or actionOnDelete actionOnUpdate ) }}{{#actionOnDelete}},{ onDelete: '{{.}}' ,{{/actionOnDelete}}{{#actionOnUpdate}}onUpdate: '{{.}}'{{/actionOnUpdate}} }{{/if}}{{/if}}){{#isOwner}} {{#if isManyToMany}}@JoinTable(){{else}}@JoinColumn({ name:'{{ ../sqlName}}'}){{/if}}{{/isOwner}} - {{#if (or isOneToMany isManyToMany)}}{{printPropertyVisibility}} {{toPropertyName ../tsName}}:{{toLazy (concat (toEntityName relatedTable) "[]")}}; - {{else}}{{printPropertyVisibility}} {{toPropertyName ../tsName}}:{{toLazy (concat (toEntityName relatedTable) ' | null')}}; + {{#if (or isOneToMany isManyToMany)}}{{printPropertyVisibility}}{{toPropertyName ../tsName}}:{{toLazy (concat (toEntityName relatedTable) "[]")}}; + {{else}}{{printPropertyVisibility}}{{toPropertyName ../tsName}}:{{toLazy (concat (toEntityName relatedTable) ' | null')}}; {{/if}} {{#if relationIdField }}