Support prop: [schema1, schema2]
as a way of defining an array of length 2 with subdoc 0 having schema = schema1
and subdoc 1 having schema = schema2
#9972
Labels
new feature
This change adds new functionality, like a new method or class
Milestone
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
The schema will create 2 objects as scripted, but it will iterate twice with the values defined for object 1 in a children array.
If the current behavior is a bug, please provide the steps to reproduce.
N/A
What is the expected behaviour?
The behaviour: it should return and assign the values for both objects when doing a POST request
the Post request:
and te return is totally wrong:
more information: https://stackoverflow.com/questions/66306598/next-js-mongoose-schema-wrong-children-values-at-a-post-request
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
I am using studio3t (localhost - mongo)
and
is this possible at all, to have 2 objects in a child schema array?
The text was updated successfully, but these errors were encountered: