maccman/spine — Issue #123: Allow to create object via .create() when using `@hasOne()` relation
Author: kossnocorp
Created: 2011-10-24 11:38:44+00:00
State: open

Model:

``` coffeescript
class User extends Spine.Model
@configure('User')

@hasOne('contactList', 'ContactList')
```

Bug:

``` coffeescript
User.create().contactList().create()
# => TypeError: Cannot call method 'create' of null
```

Currently I use these code:

``` coffeescript
ContactList.create(user: user)
```