Skip to content

Sortable by count ManyToMany relations #817

Open
@ArmandArthur

Description

@ArmandArthur

I have a command's list relate to many products.
I display in a column the number of products.

How sort on this number?

<td {% if commandes.isSorted('count(r.commandProducts)') %} class="sorted"{% endif %}> {{ knp_pagination_sortable(commands, 'Number products', 'count(r.commandProducts)') }} </td>

Or there exist an other way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions