original_string: protected function addJoinTablesToQueryBuilder(QueryBuilder $queryBuilder)
      {
          $objectManager = $this->getObjectManager();
          $entityAlias   = $this->getEntityClassAlias();
          $classMetaData = $objectManager->getClassMetadata($this->getEntityClass());
  
          $assocMappings = $classMetaData->getAssociationMappings();
  
          foreach ($assocMappings as $fieldName => $assocMapping) {
              $join  = $entityAlias . '.' . $fieldName;
              $alias = self::JOIN_ALIAS_PREFIX . $fieldName;
  
              $queryBuilder->addSelect($alias);
              $queryBuilder->leftJoin($join, $alias);
          }
      }
code: protected function addJoinTablesToQueryBuilder(QueryBuilder $queryBuilder)
      {
          $objectManager = $this->getObjectManager();
          $entityAlias   = $this->getEntityClassAlias();
          $classMetaData = $objectManager->getClassMetadata($this->getEntityClass());
  
          $assocMappings = $classMetaData->getAssociationMappings();
  
          foreach ($assocMappings as $fieldName => $assocMapping) {
              $join  = $entityAlias . '.' . $fieldName;
              $alias = self::JOIN_ALIAS_PREFIX . $fieldName;
  
              $queryBuilder->addSelect($alias);
              $queryBuilder->leftJoin($join, $alias);
          }
      }
code_tokens: protected function addJoinTablesToQueryBuilder ( QueryBuilder $ queryBuilder ) { $ objectManager = $ this -> getObjectManager ( ) ; $ entityAlias = $ this -> getEntityClassAlias ( ) ; $ classMetaData = $ objectManager -> getClassMetadata ( $ this -> getEntityClass ( ) ) ; $ assocMappings = $ classMetaData -> getAssociationMappings ( ) ; foreach ( $ assocMappings as $ fieldName => $ assocMapping ) { $ join = $ entityAlias . '.' . $ fieldName ; $ alias = self :: JOIN_ALIAS_PREFIX . $ fieldName ; $ queryBuilder -> addSelect ( $ alias ) ; $ queryBuilder -> leftJoin ( $ join , $ alias ) ; } }
docstring: Adds joins for all association mappings to the query builder
  
  @param QueryBuilder $queryBuilder
docstring_tokens: Adds joins for all association mappings to the query builder