beberlei/DoctrineExtensions — Issue #58: Paginator doesn't display entities that are linked to other entities of same type
Author: danielberesh
Created: 2011-12-20 21:25:26+00:00
State: open

I have an entities of "Entry".

Many "Entry" are linked to other "entry" by the form of a unidirectional onetoone relationship.

eg.

Entry #32 --> no link to any other entry
Entry #33
Entry #34 --> Linked to Entry #33

In this situation only Entry #32 and Entry #33 show up.

This gives all entries:

$dql = "SELECT e FROM SSMURBS\Entry e";
$query = $em->createQuery($dql);
$entries = $query->getResult();

This does not:
$dql = "SELECT e FROM SSMURBS\Entry e";
$query = $em->createQuery($dql);
$result_count = Paginate::getTotalQueryResults( $query ); // Step 1
$paginateQuery = Paginate::getPaginateQuery( $query , 0, 20 ); // Step 2 and 3
$entries = $paginateQuery->getResult();

Am I doing something wrong?