Is there a way using current APIs to identify entities without an incoming relation?
Our current model has the concept of an entity type that should have a parent. That is, entities of that type should have a "parent" node with a relation from the parent to the child entity. Although we enforce this during creation, there are cases where the child could end up without a parent, such as if a request failed, or the parent was later removed. I'm wondering if there is a way to identify such orphaned nodes via current APIs.
One approach might be to utilize an LCA that is triggered on delete of the parent, and check if that would leave an orphaned child. But, that wouldn't address the identification of existing orphaned nodes prior to the deployment of the LCA. Alternatively, I could envision a process to export the entities and relations and stitch them together to identify those entities without relations, but that would be a heavier process than I'd like to use now.
Is anyone aware of a simpler approach using current APIs/capabilities?
Thanks