diff --git a/src/entity.mst b/src/entity.mst index 04c5aa8..e809475 100644 --- a/src/entity.mst +++ b/src/entity.mst @@ -33,10 +33,11 @@ import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne {{/if}} {{#if relationIdField }} - @RelationId(({{toPropertyName ../../tsEntityName}}: {{toEntityName ../../tsEntityName}}) => {{toEntityName ../../tsEntityName}}.{{toPropertyName ../tsName}}) + @RelationId(({{toPropertyName ../../tsEntityName}}: {{toEntityName ../../tsEntityName}}) => {{toPropertyName ../../tsEntityName}}.{{toPropertyName ../tsName}}) {{printPropertyVisibility}}{{toPropertyName ../tsName}}Id{{strictMode}}: {{#if isOneToOne}}{{toLazy ../tsType}}{{else}}{{toLazy (concat ../tsType "[]")}}{{/if}};{{/if}}{{/relations}} {{/Columns}} {{#if GenerateConstructor}} + {{printPropertyVisibility}}constructor(init?: Partial<{{toEntityName tsEntityName}}>) { {{#IsActiveRecord}}super(); {{/IsActiveRecord}}Object.assign(this, init);