http://www.symfony-project.org/jobeet/1_4/Doctrine/en/12
The section "Virtual" columns details how to add columns to lists that belong to related models.
For example, I have 2 model classes: Company
and User
. A User is always a member of a Company.
For the User list I want to show the Company name, I can do this by adding a getter to the User class getCompanyName()
and then in my generator.yml for the User module I would use the field name company_name
.
This works and displays the Company name for each User, but how can I sort the list by using the Company name?
addSortCriteria()
but I think this has to be used with Propel and not Doctrine – jasper11