diff --git a/include/class.orm.php b/include/class.orm.php index 80c009cf031772f4098febcda4f8e9a8b6325cb7..80360f0e6738b52b0d2fda229c83014e30b12491 100644 --- a/include/class.orm.php +++ b/include/class.orm.php @@ -2795,6 +2795,7 @@ class MySqlCompiler extends SqlCompiler { $q->related = $q->anotations = false; $model = $q->model; $q->values = $model::getMeta('pk'); + $q->annotations = false; $exec = $q->getQuery(array('nosort' => true)); $exec->sql = 'SELECT COUNT(*) FROM ('.$exec->sql.') __'; $row = $exec->getRow();