// Check for a valid relationship.
if (isset($propertyDefinitions[$relationship_specifier]) &&
$propertyDefinitions[$relationship_specifier] instanceof DataReferenceDefinitionInterface
) { // If it is, use the entity type if specified already, otherwise use
// the definition.
$target_definition =
$propertyDefinitions[$relationship_specifier]->
getTargetDefinition();
if (!
$entity_type_id &&
$target_definition instanceof EntityDataDefinitionInterface
) { $entity_type_id =
$target_definition->
getEntityTypeId();
} $entity_type =
$this->entityTypeManager->
getActiveDefinition($entity_type_id);
$field_storage_definitions =
$this->entityFieldManager->
getActiveFieldStorageDefinitions($entity_type_id);
// Add the new entity base table using the table and sql column.
$base_table =
$this->
addNextBaseTable($entity_type,
$table,
$sql_column,
$field_storage);
$propertyDefinitions =
[];
$key++;
$index_prefix .= "
$next_index_prefix.";
} else { throw new QueryException("Invalid specifier '
$relationship_specifier'"
);
} } } return "
$table.
$sql_column";
}