Will deletion on a parent document also delete the children document?


(Yangou) #1

Hi,

As the subject title, will deletion on a parent document also delete the children document?

If not, since we manually delete the parent document and set the ttl on the children documents. Will those children be able to expire without a parent document?


(Mahendra Tipale) #2

As I understand, Yes. it should delete child docs if parent doc is deleted.

To be more clear,
Let's say, you have json object: { a: {b : "test"}}
if you delete a , b is also get deleted. I hope, it clarify your question.


(Emptyemail) #3

Nested objects yes, child objects no. There is an open issue on github for that. I've used delete by query to handle the child docs.


(system) #4