Category Covered

unbindModel not working on cakephp paginate

On cakephp 1.2 or cakephp 1.3 you will see that your unbindmodel is not working on paginate.

 Model->unbindModel() works only for the very next next operation of the model. So it works perfectly for find query. but paginate has more than one operation so it does not work.

But it does not mean that it will not work. Like the following query send false as a second parameter.

 $this->DoctorAppointment->Customer->unbindModel(array('hasMany' => array('DoctorAppointment')),false);

Hope it works for you.