I have two types of content: Content A and Content B. Content B has an entity reference field that points to Content A.
My problem is that I am trying to check by code if Content B has a defined value that is a field of content A.
I tried something like this:
$query = \Drupal::entityQuery('node'); $group = $query->orConditionGroup() ->condition('content_a.field_one', 'uno') ->condition('contnet_a.field_two', 'dos'); $entity_ids = $query->condition('type', 'content_b') ->condition($group) ->execute();