We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If you don't provide conditions to a Model::count() call, then it will use group as a column name, rather than to group results.
group
ContentBlocks::count([ // 'conditions' => [ // 'deleted' => 0, // ], 'group' => 'name', ]);
results in:
lithium\data\model\QueryException Object ( [code:protected] => 1054 [message:protected] => SELECT COUNT(*) as count FROM `content_blocks` AS `ContentBlocks` WHERE `ContentBlocks`.`group` = 'name';: Unknown column 'ContentBlocks.group' in 'where clause' [string:Exception:private] => [file:protected] => /var/www/vhosts/miribase/libraries/lithium/data/source/Database.php [line:protected] => 1557 [trace:Exception:private] => Array
Adding the conditions will allow it work as expected.
conditions
The text was updated successfully, but these errors were encountered:
Fix conditon-less usage of count finder, with group, having, offset.
f315244
The Model $_query array was not in-sync with possible options of Query. Fixes #1282
Thanks for reporting -- fixed in f315244
Sorry, something went wrong.
mariuswilms
No branches or pull requests
If you don't provide conditions to a Model::count() call, then it will use
group
as a column name, rather than to group results.results in:
Adding the
conditions
will allow it work as expected.The text was updated successfully, but these errors were encountered: