fixing #13
This commit is contained in:
parent
fe17e484ce
commit
775a398ed9
@ -15,14 +15,14 @@ import {Index,Entity, PrimaryColumn, Column, OneToOne, OneToMany, ManyToOne, Joi
|
||||
default:"{{.}}",{{/default}}{{#numericPrecision}}
|
||||
precision:{{.}},{{/numericPrecision}}{{#numericScale}}
|
||||
scale:{{.}},{{/numericScale}}{{#isPrimary}}
|
||||
primary:{{isPrimary}},{{/isPrimary}}
|
||||
primary:{{isPrimary}},{{/isPrimary}}
|
||||
})
|
||||
{{name}}:{{ts_type}};
|
||||
{{/relations}}{{#relations}}
|
||||
@{{relationType}}(type=>{{relatedTable}}, {{../name}}=>{{../name}}.{{#if isOwner}}{{ownerColumn}}{{else}}{{relatedColumn}}{{/if}}){{#isOwner}}
|
||||
@JoinColumn(){{/isOwner}}
|
||||
@JoinColumn({name:'{{../name}}'}){{/isOwner}}
|
||||
{{#if isOneToMany}}{{../name}}:{{relatedTable}}[];
|
||||
{{else}}{{../name}}:{{relatedTable}};
|
||||
{{/if}}{{/relations}}
|
||||
{{/Columns}}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user