If I have an object with a parent child relationship with Id and ParentId representing the unique Id of the record and the Parent Id of the record.
I need a query that will query a list of objects and return the path to the root of the relationship for each item (i.e. Path = (AllTheParentNames)\ Name ).
Any help with this would be appreciated.
MyObject
int Id
int? ParentId
string Name
string Path
Is this the expected result?
it’s impossible to make in single query without recursion (foreach (Aggregate) on array may be good for simulate recursion, but it’s stupid)
Fix – is the Fixed point combinator