Query/Driver/ORMDriver.php
protected function loadEntity($entityIdentifier, $tableAlias, $itemMetaData)
	{
		//For FROM clause
		$entityMetaData = $this->em->getMetadataFactory()
				->getMetadataFor($itemMetaData->getEntityClass($entityIdentifier));
		$table = $entityMetaData->getTableName();

		//Joins and selected columns
		$joins = array();
		$columns = array();
		foreach($itemMetaData->getOrderedRequiredHits() as $hitPos => $hitIdentifier)
		{
			if($hitIdentifier == ItemMetaData::TYPE)
			{
				$columns[$hitPos] = array(
					'expression' => '\'' . $entityIdentifier . '\'',
					'type' => Type::STRING,
					'scoreFactor' => 0
				);
			}
			//Score is added in query with search request
			elseif($hitIdentifier != ItemMetaData::SCORE)
			{
				$attribute = $itemMetaData->getHitEntityAttribute($hitIdentifier, $entityIdentifier);
				$columns[$hitPos] = array();
				$this->loadEntityHit($columns[$hitPos], $joins, $tableAlias, $itemMetaData->getEntityClass($entityIdentifier),
						$attribute);
				$hitScoreFactors = $itemMetaData->getHitScoreFactors();
				$columns[$hitPos]['scoreFactor'] = isset($hitScoreFactors[$hitIdentifier]) ?
						$hitScoreFactors[$hitIdentifier] : 0;
			}
		}
		return array(
			'table' => $table,
			'tableAlias' => $tableAlias,
			'joins' => $joins,
			'columns' => $columns
		);
	}
protected function loadEntity($entityIdentifier, $tableAlias, $itemMetaData)
	{
		//For FROM clause
		$entityMetaData = $this->em->getMetadataFactory()
				->getMetadataFor($itemMetaData->getEntityClass($entityIdentifier));
		$table = $entityMetaData->getTableName();

		//Joins and selected columns
		$joins = array();
		$columns = array();
		foreach($itemMetaData->getOrderedRequiredHits() as $hitPos => $hitIdentifier)
		{
			if($hitIdentifier == ItemMetaData::TYPE)
			{
				$columns[$hitPos] = array(
					'expression' => '\'' . $entityIdentifier . '\'',
					'type' => Type::STRING,
					'scoreFactor' => 0
				);
			}
			//Score is added in query with search request
			elseif($hitIdentifier != ItemMetaData::SCORE)
			{
				$attribute = $itemMetaData->getHitEntityAttribute($hitIdentifier, $entityIdentifier);
				$columns[$hitPos] = array();
				$this->loadEntityHit($columns[$hitPos], $joins, $tableAlias, $itemMetaData->getEntityClass($entityIdentifier),
						$attribute);
				$hitScoreFactors = $itemMetaData->getHitScoreFactors();
				$columns[$hitPos]['scoreFactor'] = isset($hitScoreFactors[$hitIdentifier]) ?
						$hitScoreFactors[$hitIdentifier] : 0;
			}
		}
		return array(
			'table' => $table,
			'tableAlias' => $tableAlias,
			'joins' => $joins,
			'columns' => $columns
		);
	}
protected function loadEntity ( $ entityIdentifier , $ tableAlias , $ itemMetaData ) { //For FROM clause $ entityMetaData = $ this -> em -> getMetadataFactory ( ) -> getMetadataFor ( $ itemMetaData -> getEntityClass ( $ entityIdentifier ) ) ; $ table = $ entityMetaData -> getTableName ( ) ; //Joins and selected columns $ joins = array ( ) ; $ columns = array ( ) ; foreach ( $ itemMetaData -> getOrderedRequiredHits ( ) as $ hitPos => $ hitIdentifier ) { if ( $ hitIdentifier == ItemMetaData :: TYPE ) { $ columns [ $ hitPos ] = array ( 'expression' => '\'' . $ entityIdentifier . '\'' , 'type' => Type :: STRING , 'scoreFactor' => 0 ) ; } //Score is added in query with search request elseif ( $ hitIdentifier != ItemMetaData :: SCORE ) { $ attribute = $ itemMetaData -> getHitEntityAttribute ( $ hitIdentifier , $ entityIdentifier ) ; $ columns [ $ hitPos ] = array ( ) ; $ this -> loadEntityHit ( $ columns [ $ hitPos ] , $ joins , $ tableAlias , $ itemMetaData -> getEntityClass ( $ entityIdentifier ) , $ attribute ) ; $ hitScoreFactors = $ itemMetaData -> getHitScoreFactors ( ) ; $ columns [ $ hitPos ] [ 'scoreFactor' ] = isset ( $ hitScoreFactors [ $ hitIdentifier ] ) ? $ hitScoreFactors [ $ hitIdentifier ] : 0 ; } } return array ( 'table' => $ table , 'tableAlias' => $ tableAlias , 'joins' => $ joins , 'columns' => $ columns ) ; }
Loads the database mapping for the specified entity

@param ItemMetaData $itemMetaData
Loads the database mapping for the specified entity