From bc761727e1bd8d17bf752cf0eaa9a690d4ecf780 Mon Sep 17 00:00:00 2001 From: Dan Caddigan Date: Wed, 29 Sep 2021 02:19:49 -0400 Subject: [PATCH] fix(one-to-one): dont automatically add joincolumn (#478) --- src/decorators/OneToOne.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/decorators/OneToOne.ts b/src/decorators/OneToOne.ts index 9c2520c2..7aa40359 100644 --- a/src/decorators/OneToOne.ts +++ b/src/decorators/OneToOne.ts @@ -1,5 +1,5 @@ import { Field } from 'type-graphql'; -import { JoinColumn, ObjectType, OneToOne as TypeORMOneToOne, RelationOptions } from 'typeorm'; +import { ObjectType, OneToOne as TypeORMOneToOne, RelationOptions } from 'typeorm'; import { composeMethodDecorators, MethodDecoratorFactory } from '../utils'; export function OneToOne( @@ -8,7 +8,6 @@ export function OneToOne( options?: RelationOptions ): any { const factories = [ - JoinColumn() as MethodDecoratorFactory, Field(typeFunctionOrTarget, options) as MethodDecoratorFactory, TypeORMOneToOne(typeFunctionOrTarget, inverseSide, options) as MethodDecoratorFactory ];