Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Neo4j getting summary updates false for two updates the same field as null

I’ve following neo4j query

match (u:users {id: $id) set u.isOnline = null

It gives update summary for properties set value as 1 for first time and when i re-run the query again it gives 0 for the same value.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

But when i run this query

match (u:users {id:$id}) set u.token = $token

It always gives me the update summary for property set value is 1 regardless of how many time i ran this query

>Solution :

yes, that’s what neo4j behaviour so you must aware of this when working with null values

When updating null neo4j pre check if value exists like node exists, but it not gonna check for string or an other type of values like array

so you always get true for string update even for same value

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading