Doctrine 1
  1. Doctrine 1
  2. DC-544

Doctrine_Pager bug with Oracle. getNumResults doesn't return the correct number of records

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: Pager
    • Labels:
      None

      Description

      The function getNumResults() doesn't work correctly.

      This is my model class

      class ReviewListTable extends Doctrine_Table
      {
       public function getAvailable()
       {
         return $this->createQuery()
         ->select('DISTINCT(to_char(file_date, \'YYYY-MM-DD\')) fdate')
         ->orderBy('fdate DESC');
       }
      }
      

      If i execute this fonction, the number of record is 31. If i use the Pager, the result is 5744 records

      Controler:

      $this->pager = new Doctrine_Pager(
                                 Doctrine_Core::getTable('ReviewList')->getAvailable(),
                                 $request->getParameter('page', 1),
                                 20);
      

      View:

      $rs = $this->pager->execute();
      echo $pager->getNumResults();
      

        Activity

        Hide
        Jonathan H. Wage added a comment -

        Hmm. I don't quite understand. Can you make a test case?

        Show
        Jonathan H. Wage added a comment - Hmm. I don't quite understand. Can you make a test case?

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Bertrand Zuchuat
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: