#157 ✓resolved
Andreas Ronge

Support for incoming relationships in Neo4j::Rails::Model

Reported by Andreas Ronge | March 4th, 2011 @ 09:16 AM | in 1.1.0

Currently only outgoing relationships is supported using Neo4j::Rails::Model

The following should be possible (just like for Neo4j::NodeMixin)

class Person < Neo4j::Rails::Model
  has_n :knows
  has_n(:known_by).from(knows)
end

p1 = Person.create
p2 = Person.create  
p1.known_by << p2
p1.known_by.include?(p2) #=> true

p2.knows.include?(p1) #= true

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

Referenced by

Pages