mongolass-plugin-populate

0.5.2 • Public • Published

mongolass-plugin-populate

const users = await User
  .find()
  .populate([
    { path: 'aId', model: 'A', as: 'a' }, // parallel
    { path: 'bId', model: 'B', as: 'b' } // parallel
  ])
  .populate({ path: 'a.author', select: { name: 1, avatar: 1 }, model: 'User' }) // series

/mongolass-plugin-populate/

    Package Sidebar

    Install

    npm i mongolass-plugin-populate

    Weekly Downloads

    17

    Version

    0.5.2

    License

    MIT

    Unpacked Size

    9.64 kB

    Total Files

    6

    Last publish

    Collaborators

    • nswbmw