CastError: Cast to embedded failed for value "{ value: 'x' }" at path "items" #9873
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
needs repro script
Maybe a bug, but no repro script. The issue reporter should create a script that demos the issue
Milestone
Hey guys,
After updating to Mongoose 5.11.13 I am getting the following error when trying to add an item to a sub-object inside a document.
My main Schma is called
Card
. It holds a sub-object/sub-document calledProperty
and it looks like this:The query being used to insert a new
item
inside aproperty
is:I have no idea why this is happening as we have a similar query for
Checklist
and it works. I tried this query inside the mongo shell and it worked there. Could you guys help me figure out what exactly am I missing?Oh and I tried looking into the whole
TypeError: this.ownerDocument(...).isSelected is not a function
part as well, didnt have any luck finding anything that could help me in my caseThe text was updated successfully, but these errors were encountered: