Skip to content

ormjs: includes syntax #6

@OKNoah

Description

@OKNoah

I had the idea of using this syntax for joins.

User.findOne({
  email: body.email,
  $include: {
    active: true,
    $collection: Team
  }
})

This would find a User by their email, then find any of their teams, using the filter {active: true}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions