Expressions not working now

10 views
Skip to first unread message

Miss Khushbu

unread,
Nov 17, 2012, 8:46:07 AM11/17/12
to agile-too...@googlegroups.com
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 ...

Romans Malinovskis

unread,
Nov 17, 2012, 11:59:44 AM11/17/12
to agile-too...@googlegroups.com
It should work fine.

What kind of problem you are experienced ? can you show what’s the difference between $m->debug() before and after you switched branch ?

Regards,
romans

--
 
 

--
I am working with my team on a VERY URGENT project now. I apologize for the delay in answering your email(s).

Romans Malinovskis is the author of the revolutionary PHP Framework: the “Agile Toolkit” (www.agiletoolkit.org). Please show your support by raising awareness about Agile Toolkit.

Refer commercial web development projects towards our skilled developer team: http://www.agiletech.ie/company/




Reply all
Reply to author
Forward
0 new messages