
init_on_create is not called when creating a new relationship with the << operator
Reported by Andreas Ronge | September 22nd, 2011 @ 12:30 PM
Failing RSpec
it "should call the init_on_create method when a new relationship is created" do
class Authored
include Neo4j::RelationshipMixin
property :ts
def init_on_create *args
super
self.ts = 'been here'
end
end
class UserNode
include Neo4j::NodeMixin
has_n( :authored ).relationship( Authored )
end
new_tx
user_node = UserNode.new
user_node.authored << Neo4j::Node.new
user_node.authored_rels.first.ts.should == 'been here'
end
Also, see http://groups.google.com/group/neo4jrb/browse_thread/thread/de01e3d...
Comments and changes to this ticket
-
Andreas Ronge September 22nd, 2011 @ 09:31 PM
- State changed from new to resolved
(from [2dfdb9de699f3b92363d917af92a6dc701f811f2]) init_on_create is not called when creating a new relationship with the << operator [#183 state:resolved] https://github.com/andreasronge/neo4j/commit/2dfdb9de699f3b92363d91...
-
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.
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
Referenced by
-
183 init_on_create is not called when creating a new relationship with the << operator (from [2dfdb9de699f3b92363d917af92a6dc701f811f2]) init_on...