Hello,
CSort has been greatly improved by supporting virtual attributes like ‘name’ being sorted as ‘lastname, firstname’ or ‘department’ being sorted as ‘department.name’. In the case of ‘department’, the value comes from a related record (Employee is related to Department via departmentId).
I am making a DB front where the user can sort on all sorts of related information. I would like to pull in the related records only if they are needed. This could be done using CSort if each virtual attribute could also have a ‘with’ parameter. When applyOrder() is called, in addtion to setting $criteria->order, $criteria->with could also be updated. Then the related information would be pulled in as needed.
thanks,
Greg