SkyPHP/skyphp — pull request #42 by stanistan (2012-04-13 16:48:58+00:00)
Title: BelongsTo() feature. 

Allows for linking of models:

#### Example:

```php

artist aql:

artist { name as artist_name, [artist_album]s }

----------------------------------------------------------------

artist_album aql:

artist_album { name as album_name, artist_id }

'Artist');
public $_belongs_to = array('artist' => 'artist_id');

...

}

```

After an `artist_album` record is inserted or deleted, `artist::refreshCache($id)`, will be triggered so that the `artist` object will always have the proper collection of albums.