Any way to select one in one to many relationship via XPath?

In my domain model I have a 1 to many relationship between line manager and employee, which are both of the same entity type, Account. If I create a template grid with a list of Accounts, I can traverse the association tree and check whether the current user is the line manager of each employee, resulting in a list of people they supervise: [Administration.LineManager_Supervisees = '[%CurrentUser%]'] How would I go about creating an XPath which results in the current user's line manager? It seems to me I need something like the following pseudocode, which doesn't seem possible: [id = '[%CurrentUser%]'/Administration.LineManager_Supervisees/Administration.Account]   I need to use an XPath as I am using the PredefinedFilters widget to provide some powerful and user friendly search functions.
2 answers

Hi Feargus,

Check out this article about retrieving data over self references:


There's a function called reversed() that should do what you need.


Hi Feargus,

I think you need


in your Xpath:

[Administration.LineManager_Supervisees[reversed ()] = '[%CurrentUser%]']