youknowriad/OREM — pull request #2 by jubianchi (2013-04-12 15:58:06+00:00)
Title: Add lazy loaded relations

Perhaps this needs some refactoring to improve proxyfying...
Here is an example usage :

```yml
class: Entities\User
url: /users
fields:
id:
type: integer
login:
primaryKey: true
type: string

# ...

hasMany:
organizations:
remote: orgs
targetEntity: organization
lazy: true

```

```php
getManager();

$user = $manager->getRepository('user')->find('jubianchi');
$userOrgas = $user->getOrganizations();
```