Skip to content

Commit

Permalink
Remove autoFields from count method
Browse files Browse the repository at this point in the history
When autoFields was set to true and count method was triggered, autofields were added to the query and SQL failed due to wrong format.
  • Loading branch information
Ladislav Gallay committed Aug 25, 2014
1 parent 99f4622 commit 17719c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ORM/Query.php
Expand Up @@ -474,6 +474,7 @@ public function applyOptions(array $options) {
*/
public function count() {
$query = clone $this;
$query->autoFields(false);
$query->limit(null);
$query->order([], true);
$query->offset(null);
Expand Down

0 comments on commit 17719c6

Please sign in to comment.