public function executeSearch()
    {
        $output = array("aaData" => array());

        $query = $this->qb->getQuery()->setHydrationMode(Query::HYDRATE_ARRAY);
        $items = $this->useDoctrinePaginator ?
            new Paginator($query, $this->doesQueryContainCollections()) : $query->execute();

        foreach ($items as $item) {
            if ($this->useDtRowClass && !is_null($this->dtRowClass)) {
                $item['DT_RowClass'] = $this->dtRowClass;
            }
            if ($this->useDtRowId) {
                $item['DT_RowId'] = $item[$this->rootEntityIdentifier];
            }
            // Go through each requested column, transforming the array as needed for DataTables
            for ($i = 0 ; $i < count($this->parameters); $i++) {
                // Results are already correctly formatted if this is the case...
                if (!$this->associations[$i]['containsCollections']) {
                    continue;
                }

                $rowRef = &$item;
                $fields = explode('.', $this->parameters[$i]);

                // Check for collection based entities and format the array as needed
                while ($field = array_shift($fields)) {
                    $rowRef = &$rowRef[$field];
                    // We ran into a collection based entity. Combine, merge, and continue on...
                    if (!empty($fields) && !$this->isAssocArray($rowRef)) {
                        $children = array();
                        while ($childItem = array_shift($rowRef)) {
                            $children = array_merge_recursive($children, $childItem);
                        }
                        $rowRef = $children;
                    }
                }
            }
            $output['aaData'][] = $item;
        }

        $outputHeader = array(
            "sEcho" => (int) $this->echo,
            "iTotalRecords" => $this->getCountAllResults(),
            "iTotalDisplayRecords" => $this->getCountFilteredResults()
        );

        $this->datatable = array_merge($outputHeader, $output);

        return $this;
    }