From c23256a62645f8e24fd81c2b02629f3e12bc0412 Mon Sep 17 00:00:00 2001 From: Chlorine Date: Wed, 30 Jan 2019 13:18:20 +0300 Subject: [PATCH] Current case-conv for class name in @RelationId In @RelationId decorator generation class name must be case-converted according to current settings P.S. Thanks for a great work! --- src/entity.mst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity.mst b/src/entity.mst index c86de87..db27e03 100644 --- a/src/entity.mst +++ b/src/entity.mst @@ -32,7 +32,7 @@ import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne {{/if}} {{#if relationIdField }} - @RelationId(({{../../tsEntityName}}: {{../../tsEntityName}}) => {{../../tsEntityName}}.{{toPropertyName ../tsName}}) + @RelationId(({{../../tsEntityName}}: {{toEntityName ../../tsEntityName}}) => {{../../tsEntityName}}.{{toPropertyName ../tsName}}) {{toPropertyName ../tsName}}Id: {{#if isOneToOne}}{{toLazy ../tsType}}{{else}}{{toLazy (concat ../tsType "[]")}}{{/if}};{{/if}}{{/relations}} {{/Columns}} {{#if GenerateConstructor}}