You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But if "attrValue" is type of Map<String, Object> , I cannot perform this cypher code:
SET c.myAttr= {value}", Values.parameters("value", attrValue)
The best solution for me was to create a new node and then put there my map
tx.run("MATCH (c:Root) WHERE ID(c) = 10
MERGE (c)-[:attr {name:'map'}]->(map) SET map = {value}", Values.parameters("value", attrValue));
But this approach is not convenient as it becomes difficult to read attribute back fom neo4j to java (as I shoult find 2 nodes and relationship)
So, do you have a plan to implement embedded map attributes ?
The text was updated successfully, but these errors were encountered:
This is something that is on the plate for some future Neo4j version, but as there is much interesting functionality waiting to be implemented, so we do not know when we'll actually get to it.
Feel free to close the issue or leave it open as you wish.
Guidelines
Using neo4j-java-driver I can write:
boolean fl = session.readTransaction(new TransactionWork() {
@OverRide
public Boolean execute(Transaction tx) {
tx.run("MATCH (c:Root) WHERE ID(c) = 10 SET c.myAttr= {value}", Values.parameters("value", attrValue));
return true;
}
});
Here "attrValue" may have a type according to this article https://neo4j.com/docs/developer-manual/current/drivers/cypher-values/
But if "attrValue" is type of Map<String, Object> , I cannot perform this cypher code:
SET c.myAttr= {value}", Values.parameters("value", attrValue)
The best solution for me was to create a new node and then put there my map
tx.run("MATCH (c:Root) WHERE ID(c) = 10
MERGE (c)-[:attr {name:'map'}]->(map) SET map = {value}", Values.parameters("value", attrValue));
But this approach is not convenient as it becomes difficult to read attribute back fom neo4j to java (as I shoult find 2 nodes and relationship)
So, do you have a plan to implement embedded map attributes ?
The text was updated successfully, but these errors were encountered: