I'm new to cakePhp development. I've stuck on following problem:
I've made few models, controllers and views - it works great. The problem is that after production, I have to made new table(Transactionaltemp table and corresponding model and controller ) in the db that logically is "connected" to other tables, but technically does not needs to - for ex. it holds temporary info on user_id, time, ip and similar. So, other tables doesn't need to be directly connected to that.
The problem is when I try (in some other controller than transactionaltemps_controller
):
$this->loadModel('Transactionaltemp');
I get error - the model is not found (it is true because the model is missing in the cache). Interesting enough transactionaltempls_controller
is in the cache (in the cake_controllers_list
file).
I tried following stuff to resolve the problem:
- clear cache
- disable cache
- tried using
uses={..}
code in the controller that I would like to usemymodels_controller
- tried using
init('Transactionaltemp')
with no success. Here is corresponding code: The model:
<?php
class Transactionaltemp extends AppModel
{
var $name = 'Transactionaltemp';
function beforeSave() {
return true;
}
}
?>
The controller:
<?php
class TransactionaltempsController extends AppController
{
var $name = 'Transactionaltemps';
var $scaffold;
}
?>
I'll very grateful to any help!!!