I have a content type that has a node entity reference field. My base query looks like
$event_nids = \Drupal::entityQuery('node') ->condition('type', 'my_content_type') ->execute(); I'd like though to be able to sort by the title field of the referenced field type. I attempted
$event_nids = \Drupal::entityQuery('node') ->condition('type', 'my_content_type') ->sort('field_referenced_node.title', ASC) ->execute(); But I receive the error
Drupal\Core\Entity\Query\QueryException: Invalid specifier 'title' in Drupal\Core\Entity\Query\Sql\Tables->addField()
Is it possible to sort a node query by a field inside a referenced node?
sortand not use aconditionfor this api.drupal.org/api/drupal/…