Change property data type in Neo4j using spring-data-neo4j -
for nodeentity property(indexed or not - indexed), wish change data type integer string due use-case.
changed datatype in defined nodeentity class. new data gets inserted database data type of property newly set(ie.string). however, data type of property nodes in database before change remain old data type(ie integer).
there way modify datatype nodes present in database?
cypher has couple of functions this:
toint: convert string integer/long valuetofloat: convert string floating point valuestr: convert string
with can modify datatypes of existing properties. assume have entity of type person having numeric zipcode property. want convert zipcode string:
match (node:person) set node.zipcode = str(node.zipcode) if have large number of entities of type make sure transactions don't grow large using skip , limit.
Comments
Post a Comment