GetAllWithChildrenAsync custom filter with parent object
Issue #139
closed
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)
-
-
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?
-
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. -
- changed status to closed
-
reporter Thanks a lot!
- Log in to comment
At the moment of executing the query
ChildrenObject.ParentObject
will always benull
beacause no joins are performed automatically. You have to manually execute aJOIN
query manually in order to achieve it. Sorry for the inconvenience.