-
Notifications
You must be signed in to change notification settings - Fork 276
Declared Relationships
Andreas Ronge edited this page Jul 21, 2014
·
8 revisions
A has_many
declaration is used to generate accessor methods for traversing relationships as well as creating new relationships.
The first argument of the has_many
is the name of the method that will be generated.
Example:
class Person
include Neo4j::ActiveNode
has_many :friends
end
This will generate a friends method on the Person class so that we can create new relationships between two nodes like this:
p = Person.create
p.friends << Person.create
WARNING: Much of the information in this wiki is out of date. We are in the process of moving things to readthedocs
- Project Introduction
- Neo4j::ActiveNode
- Neo4j::ActiveRel
- Search and Scope
- Validation, Uniqueness, and Case Sensitivity
- Indexing VS Legacy Indexing
- Optimized Methods
- Inheritance
- Core: Nodes & Rels
- Introduction
- Persistence
- Find : Lucene
- Relationships
- Third Party Gems & extensions
- Scaffolding & Generators
- HA Cluster