#131 ✓resolved
Ben Jackson

Changing attributes after persistance should not write directly to the DB unless specifically saved

Reported by Ben Jackson | November 15th, 2010 @ 04:14 PM | in 1.0.0.beta.21

Currently, when a Neo4j Model is saved, a Java Node is created and that replaces the proxy 'Value' object that handled holding properties and relationships before validation and callbacks allow the data to be saved permanently. After being saved, any attribute can be changed and will be immediately written to the DB.

To solve this, I need to refactor the code to make it so that attribute assigning never goes straight to the DB, but specifically requires a #save, like ActiveRecord.

At the same time, some refactoring will be done to make sure that transactions and type conversions are only ever used when necessary, e.g. when saving and not when validating.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Neo4j.rb is a graph database framework for JRuby.

It provides:

* Mapping of ruby objects to nodes in networks rather than in tables.
* Storage of ruby object to a file system.
* Fast traversal of relationships between nodes in a hugh node space.
* Transaction with rollbacks support.
* Indexing and quering of ruby objects.
* Integration with Rails

People watching this ticket