I would love to hear what people think would be best practice for the following scenario:
Imagine you have three tables: Employees, Subscriptions and Courses. An employee is a one to many relation to Subscriptions, and Subscriptions is a one to many relation to Courses.
How would you search for the employees that have completed Courses Where Courses.Name LIKE 'x' OR Course.Name LIKE 'y' returning a list of Deeploaded TList<Employees>?
EmployeeService.Find takes parameters for searching within the Employee object, not within the child relations, or am I mistaken?
I thought I might be able to do this in reverse, hence get the Courses and work backwards, but I couldn't see how to reference the Subscriptions collection parent:
TList<Courses> courses = CoursesService.Find("Name = 'x' OR Name = 'y'");
If that isn't enough I would like to add another search parameter Where Employees.Surname LIKE 'z'.
I think I'm going to answer myself, but a custom SP would seem to be the way forward. Thoughts?
Regards
Ben