Skip to content

Commit 901051b

Browse files
committed
Merge pull request #89 from melvinmt/bugfix/4765
fix bug count_all w/ ->object_name (refs #4765)
2 parents ea9bbe7 + 672fdf4 commit 901051b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classes/Kohana/ORM.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ public function count_all()
16441644
$this->_build(Database::SELECT);
16451645

16461646
$records = $this->_db_builder->from(array($this->_table_name, $this->_object_name))
1647-
->select(array(DB::expr('COUNT('.$this->_db->quote_column($this->_primary_key).')'), 'records_found'))
1647+
->select(array(DB::expr('COUNT('.$this->_db->quote_column($this->_object_name.'.'.$this->_primary_key).')'), 'records_found'))
16481648
->execute($this->_db)
16491649
->get('records_found');
16501650

0 commit comments

Comments
 (0)