You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongoo...@googlegroups.com
Thanks Rauch and Tim.
I at first defined the schema using the constructor directly like:
var Tasks = new Schema({
title : String
, subtasks : [Tasks]
});
Then I got "typeerror cannot call method 'path' of undefined" when updating the object nested in the array.
With Rauch's suggestion it works like a charm.
I know this is a pretty old post but I wish people fallen in the same trap can search the the post easily.
Tim於 2012年10月6日星期六UTC+8上午9時23分27秒寫道:
I know it's an old post, but can confirm you still need to do .add with recursive schemas having spent last hour wondering why child array was returned as Array[] instead of MongooseDocumentArray.