Doctrine 1
  1. Doctrine 1
  2. DC-506

Doctrine_Adapter_Statement_Oracle missing fetch statement in fetchAll()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.12, 1.0.13, 1.0.14, 1.1.4, 1.1.5, 1.1.6, 1.2.0-ALPHA1, 1.2.0-ALPHA2, 1.2.0-ALPHA3, 1.2.0-BETA1, 1.2.0-BETA2, 1.2.0-BETA3, 1.2.0-RC1, 1.2.0
    • Fix Version/s: 1.2.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux RHEL5 (discovered in Symfony, but crosschecked with Doctrine 1.x source)

      Description

      It looks like the developer changed their mind on how to set the flags halfway through coding, as the $flags variable is not used. Critically, if the default FETCH_BOTH is specified, then no fetch is performed. I also did some testing with the OCI_BOTH constant, and could not get it to return the desired results (only enumerated results were returned). I also tried replacing OCI_BOTH with OCI_NUM + OCI_ASSOC with the same results.

      I guess this should either throw an exception (not supported) or be fixed to return the appropriate results.

      Line 361 in v1.2

              $flags = OCI_FETCHSTATEMENT_BY_ROW + OCI_ASSOC;
      
              $int = $fetchStyle & Doctrine::FETCH_COLUMN;
      
              if ($fetchStyle == Doctrine::FETCH_BOTH) {
                  $flags = OCI_BOTH;
                  $numberOfRows = @oci_fetch_all($this->statement, $data, $skip, $maxrows, OCI_FETCHSTATEMENT_BY_ROW + OCI_ASSOC + OCI_RETURN_LOBS);
              } else if ($fetchStyle == Doctrine::FETCH_ASSOC) {
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Beorn Harris
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: