How can a view be written that contains only orphaned documents (not referenced by any others)?
Hypothetical example: DocType=“Book” is the parent with many DocType=“Page” children. How do you create a view of only those Books which have no Pages ---- without using an array of Pages within Book doc. When the last page is deleted, the Book will also be automatically deleted. However, if something goes wrong in the deletion process, a background cleanup function must go find all the orphaned books without pages and delete them.