camo icon indicating copy to clipboard operation
camo copied to clipboard

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

Open dspangenberg opened this issue 5 years ago • 1 comments

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.

dspangenberg avatar Aug 09 '18 19:08 dspangenberg

@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.

Luidog avatar Aug 09 '18 20:08 Luidog