Open mlromero opened 4 years ago
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" ],
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.
Same here.
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.