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 value
  • tofloat: convert string floating point value
  • str: 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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -