> On 25. mar. 2016, at 17:46, Andrus Adamchik <[email protected]> wrote: > > >> On Mar 25, 2016, at 7:45 PM, Hugi Thordarson <[email protected]> wrote: >> >> Hi all! >> >> Subject says it all, really. How do I write an Expression to fetch all >> records where a to-many relationship contains an object. >> >> For example, let’s say a “Person” entity has a to-many relationship to an >> “Employment" entity, which is then linked to a “Company” entity. And I want >> to fetch all “Person” records that are linked to a certain company record.\ > > Something like "employments.company = $company" should work. This results in > simple joins across to-many, and should give you what you need.
Of course. Works like a charm, thanks! - hugi
