You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have a few lines of documentation showing that you should use spaces when you want to populate multiple nested fields.
When you have a request that looks like: /orders/${id}?populate=quotation.customer,quotation.quotlines,movements
you end up with a populate object that looks like: population [ { path: 'quotation', populate: { path: 'quotlines' } }, { path: 'movements' } ]
Instead of : population [ { path: 'quotation', populate: [{ path: 'quotlines' }, { path: 'customer' }] }, { path: 'movements' } ]
The solution to that is that your request should be made using spaces for consecutive fields from the same key, like so: /orders/${id}?populate=quotation.customer quotlines,movements
That solution was provided by a veteran user from my team, but it would be nice for it to be documented in the readMe in the populate section.
The text was updated successfully, but these errors were encountered:
Thanks for documenting this here - it really helped me. I had an additional complication where I wanted to populate group.tutor.contact and group.tutor2.contact. The solution is: group.tutor tutor2.contact
It would be nice to have a few lines of documentation showing that you should use spaces when you want to populate multiple nested fields.
When you have a request that looks like:
/orders/${id}?populate=quotation.customer,quotation.quotlines,movements
you end up with a populate object that looks like:
population [ { path: 'quotation', populate: { path: 'quotlines' } }, { path: 'movements' } ]
Instead of :
population [ { path: 'quotation', populate: [{ path: 'quotlines' }, { path: 'customer' }] }, { path: 'movements' } ]
The solution to that is that your request should be made using spaces for consecutive fields from the same key, like so:
/orders/${id}?populate=quotation.customer quotlines,movements
That solution was provided by a veteran user from my team, but it would be nice for it to be documented in the readMe in the populate section.
The text was updated successfully, but these errors were encountered: