Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 对多个字段键入一对一关系_Postgresql_Typeorm - Fatal编程技术网

Postgresql 对多个字段键入一对一关系

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

如何在TypeORM中制作类似的内容

实体子项:

@Field(()=>Parent,{nullable:true})
@多音(()=>Parent,(Parent)=>Parent.children)
父亲:父母;
@字段(()=>Parent,{nullable:true})
@多音(()=>Parent,(Parent)=>Parent.children)
母亲:父母;
实体母公司:

@OneToMany(()=>孩子,“母亲”)//失踪的父亲
儿童:儿童[];
我的问题是如何在实体父母上与母亲和父亲建立一对一的关系