I have a script that inserts an object into the database and then I have like 20 000 other little objects to be inserted. So I save the other objects into an array and save
You can in your model.
$this->ModelName->getDatasource()->disconnect(); //do stuff $this->ModelName->getDatasource()->connect();