[CRUD Writable Views] It's not clear how to configure the pipeline for a one-to-many relation (multilookup) #328
Replies: 1 comment
-
Hi @alexBonadei! We acknowledged the unclear documentation regarding Writable Views and the fact that multi-lookup was not properly working. Consequently, we implemented a fix for configuring multi-lookups in aggregation pipeline and reviewed the documentation. It is available in the new CRUD Service version, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Which section?
Marketplace
Which is the version?
.
Description
Hi, I'm having troubles when setting up a writable view.
I have the
orders
collection where there is a field calleddishes
which is an array of strings representing the ids of the ordered dishes:I wrote a pipeline for the view that correctly returns this:
However the POST does not work as I expect.
The docs states this:
Have at least one $lookup step in the view pipeline followed by $unwind to make sure only one object it is returned;
But after the lookup step I don't need to unwind, because then I'll be forced to group them back.
Probably the pipeline I wrote is not compatible.
My pipeline performs these steps:
Am I missing something? Thank you in advance
Actual Outcome
No response
Expected Outcome
No response
Beta Was this translation helpful? Give feedback.
All reactions