From 834d1f1d6123941aef45d583d0299ef89bdb79e2 Mon Sep 17 00:00:00 2001 From: Matt Hilliard Date: Thu, 13 Aug 2020 18:00:56 -0600 Subject: [PATCH] Fix for #1795. @ManyToOne relations should not have an array type. --- src/drivers/AbstractDriver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/AbstractDriver.ts b/src/drivers/AbstractDriver.ts index 7db7feb..fb9d855 100644 --- a/src/drivers/AbstractDriver.ts +++ b/src/drivers/AbstractDriver.ts @@ -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;