scottwrobinson / camo

A class-based ES6 ODM for Mongo-like databases.
556 stars 80 forks source link

Marpat: find({}, {population: true}) doesn't work #121

Open dspangenberg opened 6 years ago

dspangenberg commented 6 years ago

Hi,

marpat from @Luidog, unfortunately, hasn't an issue section, so I try my luck here.

It seems that populate on find doesn't work:

  const data = await Contact.find({}, { sort: ['name', 'firstName'], populate: ['company'] })
  const data = await Contact.find({}, { sort: ['name', 'firstName'], populate: true })

Result: [...] company: "KfwHFVBcHqBqG9hB" [...]

Population with findOne() works fine.

Luidog commented 6 years ago

@dspangenberg I just enabled issues on the marpat repo. Sorry about the oversight. I think this issue is more appropriate for that repo. It will be a few weeks until I am able to look into it because I am currently traveling but I will do so once I am back. I suggest you close this issue and open one here:

https://github.com/Luidog/marpat/issues/new

When / if you create an issue would you mind including a specific failing test? This would help greatly.