I have custom content types in my Drupal 8 module and want to query nodes of those content types programmatically.
Querying through entityQuery is easy. However, I have also entity reference fields (so a node of one content type has a relation to a node of another content type).
Is there a way how to make a query that will return 'rows' of field values, exactly as when I use raw SQL INNER JOIN? I want to have an associative array of all field values, not only the specific node, but also the referenced nodes/entities.
Right now I have an own class to handle this, but it's way too much complicated and, I believe, unnecessary, so I guess I'm missing something.