Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested populate not working #230

Open
mlromero opened this issue Oct 20, 2020 · 1 comment
Open

Nested populate not working #230

mlromero opened this issue Oct 20, 2020 · 1 comment

Comments

@mlromero
Copy link

Hello,

I am following this example: https://github.com/moleculerjs/moleculer-examples/blob/master/conduit/services/articles.service.js
and I have applied nested populate but not working. Main populate is working perfect.

Requests services:

fields: ["_id", "comment", "pet", "createdAt", "updatedAt" ],

populates: { "pet": { action: "pets.get", params: { fields: ["_id", "name", "especie", "raza", "age", "color" ] } },}

Attention service:
fields: ["_id", "request", "vet", "client", "createdAt", "updatedAt" ],

populates: { "request": { action: "requests.get", params: { fields: [ "_id", "comment", "pet" ], populates: [ "pet" ] } }, "client": { action: "clients.get", params: { fields: ["_id", "name", "lastname", "email", "address" ] } }, "vet": { action: "vets.get", params: { fields: ["_id", "name", "lastname", "email", "actual_address" , "education"] } } },

let params = { limit, offset, sort: ["-createdAt"], populate: [ "request", "client" ], query: query };

Any idea?

Thanks for yours responses.

Regards.

@cristianm
Copy link

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants