给出一个Example
类,是否有可能找到所有具有relations
的字段?
@ObjectType()
@Entity('example')
export class Example extends Base {
@Field(type => User)
@ManyToOne(type => User, { nullable: false })
@JoinColumn()
createdBy: User;
@Field()
@Column()
name: string;
}
进入和离开的某种方式...
getRelations(Example) // => ['createdBy']