Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Account.forge({
- id: 1
- }).fetch({
- withRelated: ['accounts']
- }).then(function (account) {
- return account.related('accounts');
- }).then(function (accounts) {
- var account = accounts.at(0).toJSON({ omitPivot: true });
- res.json(account);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement