Skip to content

Can I use both option 'reverse' and 'autoFetch' in one Association? #144

@veilevil

Description

@veilevil

Hey guys
It appears to have entered into a infinite loop when I use both option 'reverse' and option 'autoFetch' in one association
Is this a bug?
My code:

var Pet = db.define('pet', {
    name : String
});
var Person = db.define('person', {
    name : String
});
Person.hasMany("pets", Pet, {
}, {
    autoFetch:true,
    reverse : "owners"
});
Person.get(1, function(err, site) {
    return res.end(site);
});

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions