Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Vinelab/neoeloquent
Browse files Browse the repository at this point in the history
  • Loading branch information
Mulkave committed Feb 22, 2015
2 parents b8c0ba1 + 8f35963 commit ee9de19
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,6 @@ MERGE (account)<-[rel_user_account:ACCOUNT]-(user)
RETURN rel_user_account;
```

The Cypher performed by this statement will be as follows:

```
MATCH (phone:Phone) (phone)<-[:PHONE]-(user:User)
WHERE id(phone) = 1006
RETURN user;
```

### One-To-Many

```php
Expand Down Expand Up @@ -279,7 +271,7 @@ class User extends NeoEloquent {
}
```

This represents an `OUTGOING` relationship between a `:User` node and another `:User`.
This represents an `INCOMING` relationship between a `:User` node and another `:User`.

```php
$jd = User::find(1012);
Expand All @@ -297,15 +289,15 @@ Or using the `attach()` method:
```php
$jd->followers()->attach($mc);
// Or..
$jd->followers()->attach(1); // 1 being the id of $mc ($mc->getKey())
$jd->followers()->attach(1013); // 1013 being the id of $mc ($mc->getKey())
```

The Cypher performed by this statement will be as follows:

```
MATCH (user:`User`), (followers:`User`)
WHERE id(user) = 1012 AND id(followers) = 1013
CREATE (user)-[:FOLLOWS]->(followers)
CREATE (followers)-[:FOLLOWS]->(user)
RETURN rel_follows;
```

Expand Down Expand Up @@ -341,7 +333,7 @@ RETURN rel_follows;
### Dynamic Properties

```php
class Phone extends Eloquent {
class Phone extends NeoEloquent {

public function user()
{
Expand Down Expand Up @@ -541,7 +533,7 @@ class Comment extends NeoEloquent {
### Eager Loading

```php
class Book extends Eloquent {
class Book extends NeoEloquent {

public function author()
{
Expand Down Expand Up @@ -650,7 +642,7 @@ $post = $edge->related();
#### HyperEdge

This edge comes as a result of a [Polymorphic Relation](#polymorphic) representing an edge involving
tow other edges **left** and **right** that can be accessed through the `left()` and `right()` methods.
two other edges **left** and **right** that can be accessed through the `left()` and `right()` methods.

This edge is treated a bit different than the others since it is not a direct relationship
between two models which means it has no specific direction.
Expand Down

0 comments on commit ee9de19

Please sign in to comment.