require 'neo4j' s = Neo4j::Session.open class Person include Neo4j::ActiveNode property :name has_many :out, :friends end t = Neo4j::Transaction.new p = Person.new p.save p.friends << Person.create << Person.create id = p.id puts "ID #{id}" puts "FRIENDS #{p.friends.to_a.count}" t.fail t.close puts "DONE" puts "LOAD #{Neo4j::Node.load(id)}"