I'm having trouble with this error:
Fatal error: You are calling recursivelly AkActiveRecord::getAttribute by placing parent::getAttribute() or parent::get() on your model "getId" method. In order to avoid this, set the 2nd paramenter of parent::getAttribute to FALSE. If this was the behaviour you expected, please define the constant AK_ACTIVE_RECORD_PROTECT_GET_RECURSION and set it to false in /Users/will/webwork/akelos/lib/AkActiveRecord.php on line 1780
I appended this question to a separate thread related to the error, but I think that thread may be dead, so here's a repost:
I seem to be unable to make any sort of 'find all' call with conditions without running into this same error. And yet the default 'find all' call without conditions (found in a scaffolded 'listing' function) works fine.
I've been trying are all sorts of permutations of find all. For example:
$this->example =& $this->Example->find('all', array('conditions' => $this->searchCol .' like \\'%' .$this->searchFor .'%\\''));
or
$this->example =& $this->Example->find('all', array('conditions' => 'id > 0 ')); //just testing
I've tried writing out literal SQL expressions in the conditions and I've also tried using findBySQL.
Every time, if the find retrieves numerous results, it generates the error after about 66 calls. And with fewer results, everything works fine. (The reason for this can be found in the other thread.)
I understand that I can disable the warning, but what I don't understand is how to avoid making the 66+ calls. Why do they appear in a find all with conditions and not in the generic find all of the default "listing" function?
I have not set AK_ACTIVE_RECORD_ENABLE_CALLBACK_GETTERS to true and I even tried overtly setting it to false in config.php to see if that would make a difference. It didn't.
Any ideas?
1 to 1 of 1