Hi everyone
i have a* doctrine 2 pagination query* that works well when i query the
entire class. i.e
$qb = $this->queryBuilder()
->select(array('u'))
->from('BaseModel\Entity\User','u')
$paginator = new Paginator(new DoctrinePaginator(new ORMPaginator( $qb
)));
my problem is that getting all properties from the class is a huge
overhead.
i tried reducing this overhead by only calling the properties from the
classes that i need i.e
$dql = "
SELECT
u.id
FROM
BaseModel\Entity\User u
";
$qb = $this->getEntityManager()->createQuery($dql);
$paginator = new Paginator(new DoctrinePaginator(new ORMPaginator( $qb
)));
but when i tried it i got this error message:
*Not all identifier properties can be found in the ResultSetMapping: id*
i would really appreciate some advice on where i have gone wrong (why i am
getting this error report) and how i can adjust my query to just select the
properties that i need.
warm regards
Paul
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.