Stringcypher=" match ( n {metadataId:\""+startId+"\"}),(m { metadataId:\""+endId+"\"}) merge (n)-[r:"+relationType+"]->(m) set r.jobId ="+jobId;
Stringcypher=" match ( n {metadataId:\""+startId+"\"}),(m { metadataId:\""+endId+"\"}) merge (n)-[r:"+relationType+"]->(m) "+
"set r.jobId =\""+jobId+"\"";
// logger.info("运行保存关系完成:" + cypher);
session.run(cypher);
...
...
@@ -206,9 +207,9 @@ public class BaseRelationshipServiceImpl implements IBaseRelationshipService {
// merge (n)-[r:流向]->(m)
// set r={jobId:"0",descriptio:"0" }
Stringcypher="match (n { metadataId:\""+startId+"\"}), ( m { metadataId:\""+endId+"\"} ) "+
"merge (n)-[r:"+relationType+"]->(m) set r = {jobId:"+jobId+",description:"+description+" }";// set r.jobId ="+description + " and r.description = "+ description;
"merge (n)-[r:"+relationType+"]->(m) set r = {jobId:\""+jobId+"\",description:"+description+" }";// set r.jobId ="+description + " and r.description = "+ description;