getSelectSQL example


        return $this->class->getTableName();
    }

    /** * {@inheritDoc} */
    public function load(array $criteria$entity = null, $assoc = null, array $hints = []$lockMode = null, $limit = null, ?array $orderBy = null)
    {
        $this->switchPersisterContext(null, $limit);

        $sql              = $this->getSelectSQL($criteria$assoc$lockMode$limit, null, $orderBy);
        [$params$types] = $this->expandParameters($criteria);
        $stmt             = $this->conn->executeQuery($sql$params$types);

        if ($entity !== null) {
            $hints[Query::HINT_REFRESH]        = true;
            $hints[Query::HINT_REFRESH_ENTITY] = $entity;
        }

        $hydrator = $this->em->newHydrator($this->currentPersisterContext->selectJoinSql ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT);
        $entities = $hydrator->hydrateAll($stmt$this->currentPersisterContext->rsm, $hints);

        
Home | Imprint | This part of the site doesn't use cookies.