Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-25-2020 07:00 PM
Hey everyone,
I am building an app to handle contracts & transactions for my real estate office.
What would be best practices for storing changes (which can happen multiple times to a single property) in a transaction?
Lets say I have a Contract node, 2 of it's properties are closingDate and purchasePrice
Initially both are set to one value.
During the transaction, both are changed several times.
I want to keep a record of all the changes, whether it is for analysis, or something like displaying a timeline of the transaction "On this date purchasePrice changed from x to y"
What is the best way to structure my graph, assuming that dozens of properties within the Contract node can potentially change an unlimited amount of times?
07-26-2020 11:10 AM
Hi, You can use a trigger for the property. You can save the old data to another property within the same node or you can create another node with the date and old data. Another opction, for each change you can create another node and create relatioship between these nodes to create a path with the record.
http://neo4j-contrib.github.io/neo4j-apoc-procedures/3.5/operational/triggers/
Thanks
All the sessions of the conference are now available online