Skip to content

Commit

Permalink
quick notes
Browse files Browse the repository at this point in the history
  • Loading branch information
pehrlich committed Feb 2, 2012
1 parent 1eabac9 commit 6d44c90
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/basic.textile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Neo4j::Transaction.run do
end end
</ruby> </ruby>


Neo4j::Rails::Model#transaction is a convenient wrapper for this.

TIP: The Neo4j::Transaction returns a Java "org.neo4j.graph.Transaction":http://api.neo4j.org/current/org/neo4j/graphdb/Transaction.html for more info see "Neo4j Transactions":http://wiki.neo4j.org/content/Transactions TIP: The Neo4j::Transaction returns a Java "org.neo4j.graph.Transaction":http://api.neo4j.org/current/org/neo4j/graphdb/Transaction.html for more info see "Neo4j Transactions":http://wiki.neo4j.org/content/Transactions


h3. Properties h3. Properties
Expand Down Expand Up @@ -97,6 +99,12 @@ node1.rel(:both, :best_friend) # => returns one relationship, nil or throws an
node1.rel(:incoming, :best_friend) node1.rel(:incoming, :best_friend)
</ruby> </ruby>


Note that _rels takes different arguments from rels!

<ruby>
node1.rels(:both, :friends)
</ruby>

h3. Finding Relationships between two nodes h3. Finding Relationships between two nodes


You can find all relationships between two nodes like this: You can find all relationships between two nodes like this:
Expand Down

1 comment on commit 6d44c90

@andreasronge
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Maybe we should change so that _rels looks the same

Please sign in to comment.