Search code examples
javaneo4jspring-data-neo4jneo4j-ogm

How to remove the properties of map in neo4j?


I'm looking for a way to delete the properties of map from a node in neo4j. I have Stored the properties of a map in node using @Properties in my class. which stored the values in the node. my node looks like this. enter image description here

But when i am going to remove the property of the description.ENGLISH it gives me the error . which is given in the graph.

This is my Domain.

public class Test  {


private String name;



@Properties
private Map<LanguageEnum,String> description;
//getter and setter}

And this is my Query to remove description.ENGLISH from node.

MATCH (n:Test{moduleId:"tab_201"}) remove n.description.ENGLISH return n

NOTE: I am unable to update the value as well via CQL.

thanks.


Solution

  • In Cypher, you can use the backtick (`) character to quote property keys (as well as labels and types) that contain special characters (like "."). For example:

    MATCH (n:Test{moduleId:"tab_201"}) remove n.`description.ENGLISH` return n