EFQ - sort by reference entity label I'm trying to add an sort condition to an EFQ on an reference entity table, I think a code example explains this better.

$query = \Drupal::entityTypeManager()-&gt;getStorage('node')-&gt;getQuery();
$ids = $query-&gt;condition('type', 'some_type')
  -&gt;condition('some_more', 'conditions')
  -&gt;sort('a_term_field', 'ASC')
  -&gt;execute();


Now what happens is that the nodes will be sorted by the term id (since that is what is stored in the field table) but I would like to sort on the term label instead. Is something like that possible with EFQs?
Have you tried -&gt;sort('a_term_field.entity.name', 'ASC'), that should work.

Some limitations exists with multilingual fields, as it is not defined on which language it should be sorted.