Hello!
I love this library, it handles collections and relations so much better than ngResource (that is: it handles them at all.)
The issue:
Calling $new( ) does populate the $pk field, but not the "id" field.
restmodProvider.rebase({
$config: {
primaryKey: 'id'
},
})
var SomeModel = restmod.model('/foo')
SomeModel.$new(1).id // <== Is undefined.
A workaround at the moment is with this hook:
'after-init': function() {
if (typeof this.id === 'undefined') {
this.id = this.$pk;
}
}