Bug Report #4407

ORM count_all()

Added by Geo G about 2 years ago.

Status:NewStart date:01/18/2012
Priority:HighDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution: Points:1

Description

The using the count_all() in the ORM Module it does not return the correct columns.

I have found the problem:
C:\kohana-3.2.0\kohana-3.2-master-1\modules\orm\classes\kohana\orm.php
line:1466 reads

$selects[] = $method;

it should be

$selects[$key] = $method;

because in line:1488 there is a key collision happening if there is no key included in the $selects

$this->_db_pending += $selects;

Also available in: Atom PDF