-
Notifications
You must be signed in to change notification settings - Fork 369
Closed
Labels
Description
I would like to suggest adding the findByAssociation method to models that are extended using extendsTo just like the one the hasOne association provides.
var User = db.define({
username: String
});
var Account = User.extendsTo({
facebookId: String
}, {
table: 'account'
} );
// This would be nice:
User.findByAccount({
facebookId: '123456789'
}, function (err, user) {
// user
});I don't quite understand, why this is possible though:
Account.findByUser({
username: 'dude'
}, function (err, account) {
// account
});Reactions are currently unavailable