Why does CakePHP use this method name in a MySQL query rather than return the result?

后端 未结 2 629
孤街浪徒
孤街浪徒 2021-01-24 23:51

In applying the answer from a previous question, I tried overriding one of CakePHP\'s built-in pagination methods:

function paginateCount($conditions = null, $re         


        
2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-25 00:31

    This usually happens when CakePHP can't find the method in the model or attached behaviors.

    It then passes the call to the datasource (hoping it has the method and knows what to do) and that's why you get this error.

    I would check things are what they seem (is the method in the right model, is Cake making an automodel because of incorrect filenaming, etc.)

提交回复
热议问题