Closed wizardnet972 closed 3 years ago
how to solve this?
I'm having the following problem:
@Column("int", { name: "grupo", nullable: true })
group: number | null;
@ManyToOne(() => GrupoAcesso, (grupoAcesso) => grupoAcesso.grupoAcessoMenus, {
onDelete: "NO ACTION",
onUpdate: "NO ACTION",
})
@JoinColumn([{ name: "grupo", referencedColumnName: "id" }])
group2: GrupoAcesso;
I just need the relation to be generated
typeorm-model-generator version: 0.4.6 database: mysql
Why when I run
typeorm-model-generator
I get2
added to the field name?When I debug the source code I log the
databaseModel
:In the picture you can see the
relations
havefieldName
with value:companyCd2
, it should becompanies
.So my question is in which cases it adds a number to the field name?