I solve this by add path field , this field store path of all parent ids + self Id and when I sort by path I get my expected result something like this : [ { _id: "id1", par...
hmmm . so you say that parend_date solution doesn't work for my case ? and about sequential IDs , can you explain more ? because I have 3 sort type for my schema : 1- newest...
after we organized hierarchy , Is that possible to add another sort without disrupting the structure ? sort our hierarchy data by date or something else ?
This solution works for parent with depth 0 & children with depth 1 ? Is that possible for children that they are parent too ?
can you explain more about this "(probably concatenated with one more parentId for in-group sorting)." ?