Postgresql 对多个字段键入一对一关系
如何在TypeORM中制作类似的内容 实体子项:Postgresql 对多个字段键入一对一关系,postgresql,typeorm,Postgresql,Typeorm,如何在TypeORM中制作类似的内容 实体子项: @Field(()=>Parent,{nullable:true}) @多音(()=>Parent,(Parent)=>Parent.children) 父亲:父母; @字段(()=>Parent,{nullable:true}) @多音(()=>Parent,(Parent)=>Parent.children) 母亲:父母; 实体母公司: @OneToMany(()=>孩子,“母亲”)//失踪的父亲 儿童:儿童[]; 我的问题是如何在实体父
@Field(()=>Parent,{nullable:true})
@多音(()=>Parent,(Parent)=>Parent.children)
父亲:父母;
@字段(()=>Parent,{nullable:true})
@多音(()=>Parent,(Parent)=>Parent.children)
母亲:父母;
实体母公司:
@OneToMany(()=>孩子,“母亲”)//失踪的父亲
儿童:儿童[];
我的问题是如何在实体父母上与母亲和父亲建立一对一的关系