Hooks for relations
hdon opened this issue · 0 comments
hdon commented
If I have something like the following:
const Album = bookshelf.Model.extend({
songs: function() { return this.hasMany(Song) }
})
const Song = bookshelf.Model.extend({
album: function() { return this.belongsTo(Song) }
})
api.expose(Album);
Is there a way to hook requests like GET /albums/1/songs
?