coen-hyde/Shanty-Mongo — Issue #56: Get parent of subdocument
Author: remix88
Created: 2011-12-01 12:37:36+00:00
State: open

Hi,

I retrieve a Document (Parent) from the database and it contains a DocumentSet. I run through this DocumentSet and pass its elements (let's call them Subs) it on to other classes and methods. In some of these methods, I need the Parent document.

I found a method called `isParentDocumentSet`, but no method called anything like `getParent`. If I can't get the Parent directly from the Sub, I would have to pass the parent along with the Sub to all these methods, which I don't feel much for.

Is it possible to get the parent document directly from a sub-document? If not, might that be a good new feature?

Thanks.