Skip to content

Commit

Permalink
fix(one-to-one): dont automatically add joincolumn (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
goldcaddy77 authored Sep 29, 2021
1 parent 67f756a commit bc76172
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/decorators/OneToOne.ts
Original file line number Diff line number Diff line change
@@ -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<T = any>(
Expand All @@ -8,7 +8,6 @@ export function OneToOne<T = any>(
options?: RelationOptions
): any {
const factories = [
JoinColumn() as MethodDecoratorFactory,
Field(typeFunctionOrTarget, options) as MethodDecoratorFactory,
TypeORMOneToOne(typeFunctionOrTarget, inverseSide, options) as MethodDecoratorFactory
];
Expand Down

0 comments on commit bc76172

Please sign in to comment.