Sha256: 1f320820f8ccd0129781949113bafda20b1fd53dcf5698d2f321f4670490116a
Contents?: true
Size: 414 Bytes
Versions: 2
Compression:
Stored size: 414 Bytes
Contents
require 'neo4j' s = Neo4j::Session.open class Person include Neo4j::ActiveNode property :name has_many :out, :friends, type: :friends, model_class: self end t = Neo4j::Transaction.new p = Person.new p.save p.friends << Person.create(name: 'a') << Person.create(name: 'b') id = p.id puts "ID #{id}" puts "FRIENDS #{p.friends.to_a.first.name}" t.fail t.close puts "DONE" puts "LOAD #{Neo4j::Node.load(id)}"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
neo4j-3.0.0.alpha.10 | lib/test.rb |
neo4j-3.0.0.alpha.9 | lib/test.rb |