I assume you mean something like this....?

If so,
GrandParentBO
om_ParentBO (many)
ParentBO
ob_GrandParentBO (one)
om_ChildBO (many)
ChildBO
ob_ParentBO (one)
om_GrandChildBO (many)
GrandChildBO
ob_ChildBO
If this is what you mean, there are a number of ways to approach it.
If using full pathing for example...
Example 1: I want ALL GrandChild of a Particular Parent (when we know the Parent)
FIND GrandChildBO WHERE GrandChildBO.ob_ChildBO.ob_ParentBO=ParentBO
Example 2: Similarly I want ALL ChildBO of a Particular GrandParent (when we know the GrandParent)
FIND ChildBO WHERE ChildBO.ob_ParentBO.ob_GrandParentBO=GrandParentBO
You can shorten it up with Shortcuts which is SOMETIMES easier.
Add a Shortcut in GrandChildBO called sc_GrandParent defined as ob_ChildBO.ob_ParentBO.ob_GrandParentBO
Hence, Example 3: Find ALL GrandChildBO or a known GrandParent becomes
FIND GrandChildBO WHERE GrandChildBO.sc_GrandParent=GrandParent
You should not need to do any of this stuff with the ID attribute.
Rely on the correct references.
If this does not help, send me a clearer and more detailed example (I like pictures) and I will try and help.