GetAllWithChildrenAsync custom filter with parent object

Issue #139 closed
Jose Manuel IR created an issue

How can I get all the children of an object by filtering for a value of that object. I'm doing ChildrenObject.ParentObject.Name == 'AAA' but it doesn't work

Thanks.

Comments (5)

  1. Guillermo Gutiérrez

    At the moment of executing the query ChildrenObject.ParentObject will always be null beacause no joins are performed automatically. You have to manually execute a JOIN query manually in order to achieve it. Sorry for the inconvenience.

  2. Jose Manuel IR reporter

    Ok. Thanks.

    But one last help. If I execute a JOIN manually, what is the best way to load the children of each returned object?

  3. Guillermo Gutiérrez

    The most performant way would be just returning the results of the JOIN and process them manually, because you've already fetched that information from database. If performance is not an issue, you can just call GetChildren method on the returned objects to fetch the relationships.

  4. Log in to comment