Doctrine 1
  1. Doctrine 1
  2. DC-946

Oracle Doctrine_RawSql()->count() generates illegal SQL

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Component/s: Native SQL
    • Labels:

      Description

      Example RawSQL:

      $q = new Doctrine_RawSql();
          $q->select('{k.*}')
                ->from('SHP_MANDANT_KATEGORIE k')
                ->addComponent('k', 'ShpMandantKategorie k')
                ->where( 'k.id_mandant=' . $this->getIdMandant() )
                ->andWhere( 'k.id_parent=' . $this->getIdMandantkategorie() )
                ->andWhere( 'k.aktiv=1' )
                ->orderBy( 'k.sortorder' ); 
      

      $q->count() generates:

      SELECT COUNT(*) as num_results 
      FROM (SELECT DISTINCT k.id_mandantkategorie 
                    FROM SHP_MANDANT_KATEGORIE k 
                    WHERE k.id_mandant=2 AND k.id_parent=1520 AND k.aktiv=1) as results
      

      The illegal Part ist the "as results" at the end...

        Activity

        Lars Pohlmann created issue -
        Hide
        Lars Pohlmann added a comment -

        Hi,

        will this ever be corrected?
        I just came across the same bug in another project...

        Show
        Lars Pohlmann added a comment - Hi, will this ever be corrected? I just came across the same bug in another project...
        Lars Pohlmann made changes -
        Field Original Value New Value
        Labels oracle

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DC-946, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Lars Pohlmann
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: