spine/spine — pull request #435 by adambiggs (2013-03-19 00:27:23+00:00)
Title: Always assign record IDs before other attributes in Spine.Model::load()

This is basically a redo of the #171 PR which is now a bit stale. I also included more tests for `relation.coffee` and another bug fix for when model instances are passed into `.load()`.

The original bug:

```coffee
Album.hasMany 'photos', Photo
Photo.belongsTo 'album', Album

album = new Album();
album.load
name: 'My Album',
photos: [{
id: '123',
name: 'Picture of a cat'
}],
id: '456' # <= Triggers Bug!
```

Because `id` comes *after* `photos`, there's no parent record ID assigned yet to resolve the relation.

The other bug fix is exactly the same as #423