Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-11-2019 06:06 AM
In the neo4j docs I can't find any mention of properties being deletable by setting to null, but it appears to work. Using this feature has the benefit of allowing PATCH request to our API which delete properties to use the same query, and execution plan, as PATCHes that only set properties; both scenarios just involve a SET += $propertiesObject
Are there any downside to deleting properties by setting to null? If not, can it be added to the REMOVE section of the documentation as an alternative option?
03-11-2019 06:39 AM
Setting a property to null certainly does remove the property from the code as described here in the doc.
03-11-2019 07:04 AM
Might be worth a link to it from the REMOVE
section of the docs. Googling for 'delete a property from neo4j' and similar queries generally brings up results that use REMOVE
03-11-2019 10:03 AM
We could add something more there.
In the meantime, we do have a Cypher knowledge base article which provides good detail for working with null values in Neo4j.
03-11-2019 02:39 PM
Thanks for the code! I had the same problem, got as far as the reference linked by Elaine but didn't test it. Glad to know it works. I agree it would be helpful if spelled out (and indexed) as the deletions of nodes and relationships all are. Thanks.
(The issue here, for me at least, is not so much working with null values as deleting a property or property labels; null values is the tool for doing so, but you wouldn't necessarily think to look there when your goal is "delete").
All the sessions of the conference are now available online