Query does not return matching child blocks

Can anyone point me to a resource that explains why child 1.1 does not appear in the below query? It appears Logseq does not return a matching/hit child block if the parent block is also a match/hit - is that a bug or the expected behavior?

Thanks!
Steve

1 Like

I’m unsure what causes this. This also happens when using an advanced query.
If we don’t use a table view, we can see that child 1.1 is retrieved, whereas a child without the property isn’t.

Also if we change the parent we still get the child.

It seems that when we select table view, the child then is no longer displayed. That would be undesirable behavior.

It’s a great question. It seems that children are not shown in table view. I have been looking for a workaround…

I think it is expected actually and also advanced queries offer a workaround. (at least these days lol)

#+BEGIN_QUERY
{:title "Unresolved"
 :query [:find (pull ?b [*])
   :where
     [?b :block/properties ?prop]
     [(get ?prop :comment-status) ?cs]
     [(= ?cs "unresolved")]
 ]
 :group-by-page? false
 :remove-block-children? false ;this stops child blocks from getting removed from the result.
}
#+END_QUERY

1 Like

Amazing! Thank you so much for this.

1 Like