Fix for #1795. @ManyToOne relations should not have an array type.

This commit is contained in:
Matt Hilliard 2020-08-13 18:00:56 -06:00
parent ce78c37874
commit 834d1f1d61

View File

@ -372,7 +372,7 @@ export default abstract class AbstractDriver {
);
let fieldType = "";
if (isOneToMany) {
if (ownerRelation.relationType === "OneToMany") {
fieldType = `${ownerColumns[0].tscType}[]`;
} else {
fieldType = ownerColumns[0].tscType;