Hi,
I was using this model and every thing was fine till I updated my atk to
git master. now expression is giving some sort of problem.
class Model_HostelRoom extends Model_Table{
var $table="rooms";
function init(){
parent::init();
$this->hasOne('Hostel','hostel_id');
$this->addField('room_no');
$this->addField('capacity');
// $this->hasMany('HostelRoom','room_id');
$this->hasMany('RoomAllotement','room_id');
* $this->addExpression('alloted')->set(function ($m,$q){
return $m->refSQL('RoomAllotement')->count();
});
* }
}
if I comment this the page works fine.
any suggestions or
what are the changes done in atk master regarding this ..
Thanks in advance ...