Code:
new Account({
accountNumber: 123123
}).fetchAll({
withRelated: 'customer'
}).then(function(accounts) {
// accounts has all the elements
});
Logging:
{ __cid: '__cid1',
method: 'select',
options: undefined,
bindings: [],
sql: 'select "accounts".* from "accounts"' }