Open baoyicai opened 7 years ago
The setParent method only set the parentId from document._id or id. The doc.save() method trigger the path update based on parentId.
https://github.com/janez89/mongoose-materialized#instructions Check the recommended methods section. Only doc.save() / doc.remove() / etc. trigger the path update.
tried to use the setParent to change the parentId and the path, looks like only the parentId is changed, the actual path is not updated. anyone had the same issue?
Also, wondering if setParent will update the children's paths as well?