Skip to content

How to filter an Association? #267

Description

@peruzzo

I want to be able to filter a association, as in the example below only bring the emails assets of a particular user.

var User =  db.define('user', ...);
var Email = db.define('email', ...);
Email.hasOne('user', User, {required: true, reverse: 'emails'});


user.getEmails().find({active: true}).run(...);
user.getEmails().where("active = ?", [true]).all(...);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions