From 8fc25aeb5e22b1977d713de0bd437d53e00a7882 Mon Sep 17 00:00:00 2001 From: Kevin Guanche Darias Date: Wed, 31 Oct 2018 09:35:35 +0000 Subject: [PATCH] Fix: Visibility Not been applied to relations --- src/entity.mst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entity.mst b/src/entity.mst index 985917c..78c5221 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)}}{{toPropertyName ../tsName}}:{{toLazy (concat (toEntityName relatedTable) "[]")}}; - {{else}}{{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 }}