在开放密码查询中是否允许创建以下关系我正在 agensgraph 中尝试这个,
MATCH (mc: mat_comp)
MATCH (p:plant)
MATCH (mb: material)
WHERE mc.component = mb.material and mc.plant=p.b_plant
MERGE (mc) <- [ comp_2_p] - ( p)
;
ERROR: only one relationship type is allowed for MERGE
我在做什么错误...因为 mat_comp 和植物节点有植物作为常见 mat_comp 和材料节点有材料作为常见 mat_comp 有材料列植物列
p: plant
mb:
material colum
MATCH (mc: mat_comp)
MATCH (p:plant)
MATCH (mb: material)
WHERE mc.comp = mb.material and mc.plant=p.b_plant
RETURN mc.comp, mb.material, mc.plant, p.b_plant;
comp | material | plant | b_plant
------------+------------+-------+--------------
"10" | "10" | "33" | "33"
=# \d material
material | character varying(50) | | | |
b_plant | character varying(50) |
=# \d mat_comp
material | character varying(50) | | | |
comp | character varying(50) | | | |
plant | character varying(50) | | | |
-# \d plant
--------------+-----------------------+-----------+----------+---------+-------------
b_plant | character varying(50) |