Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-230

tree behavior broken in COU model

    XMLWordPrintable

Details

    Description

      actsAs(tree) throws database errors on add when enabled. Happens whether or not a parent COU is specified.

      Database Error

      Error: SQLSTATE[42803]: Grouping error: 7 ERROR: column "Cou.name" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: ... FROM "cm_cous" AS "Cou" WHERE 1 = 1 ORDER BY "Cou"."nam... ^

      SQL Query: SELECT MAX("Cou"."rght") AS "rght" FROM "cm_cous" AS "Cou" WHERE 1 = 1 ORDER BY "Cou"."name" ASC LIMIT 1

      Notice: If you want to customize this error message, create app/View/Errors/pdo_error.ctp
      Stack Trace

      #0 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Model/Datasource/DboSource.php(436): PDOStatement->execute(Array)
      #1 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Model/Datasource/DboSource.php(403): DboSource->_execute('SELECT MAX("Cou...', Array)
      #2 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Model/Datasource/DboSource.php(647): DboSource->execute('SELECT MAX("Cou...', Array, Array)
      #3 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Model/Datasource/DboSource.php(1040): DboSource->fetchAll('SELECT MAX("Cou...', false)
      #4 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Model/Model.php(2483): DboSource->read(Object(Cou), Array)
      #5 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Model/Behavior/TreeBehavior.php(905): Model->find('first', Array)
      #6 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Model/Behavior/TreeBehavior.php(153): TreeBehavior->_getMax(Object(Cou), '1 = 1', 'rght', -1)
      #7 [internal function]: TreeBehavior->beforeSave(Object(Cou), Array)
      #8 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Utility/ObjectCollection.php(104): call_user_func_array(Array, Array)
      #9 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Model/Model.php(1585): ObjectCollection->trigger('beforeSave', Array, Array)
      #10 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Model/Model.php(2071): Model->save(Array, Array)
      #11 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Model/Model.php(1908): Model->saveAssociated(Array, Array)
      #12 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/app/Controller/StandardController.php(80): Model->saveAll(Array)
      #13 [internal function]: StandardController->add()
      #14 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Controller/Controller.php(473): ReflectionMethod->invokeArgs(Object(CousController), Array)
      #15 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Routing/Dispatcher.php(104): Controller->invokeAction(Object(CakeRequest))
      #16 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/lib/Cake/Routing/Dispatcher.php(86): Dispatcher->_invoke(Object(CousController), Object(CakeRequest), Object(CakeResponse))
      #17 /mnt/hgfs/src/comanage/svn/comanage/registry/trunk/app/webroot/index.php(96): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
      #18

      {main}

      Attachments

        Activity

          People

            benn.oshrin@at.internet2.edu Benn Oshrin (internet2.edu)
            benn.oshrin@at.internet2.edu Benn Oshrin (internet2.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: