In Drupal "entity queries", you can filter using fields from referenced entities. This will effectively do a SQL join on the query.

For example:

$query = \Drupal::entityQuery('node');

// Get only nodes created by users with "@example.com" email addresses.
$query->condition('uid.entity:user.mail', '%@example.com', 'LIKE');

$nids = $query->execute();
Latest on Drupal
Mastodon Mastodon