Open milosh-dev opened 13 years ago
Scenario:
There is a model, which extends Jelly_Model.
When the code later wants to save the object into different database via controller (e.g. for unittesting, or for other reasons) it is impossible to initialize the model with diffrenet database.
$mymodel = Jelly::factory('mymodel'); $mymodel->meta()->db('somedatabase'); $mymodel->set($data)->save();
Excpected result: The data of $mymodel is saved in respective table at the database 'somedatabase'.
Actual result: The data of $mymodel is saved in default database instead.
Scenario:
There is a model, which extends Jelly_Model.
When the code later wants to save the object into different database via controller (e.g. for unittesting, or for other reasons) it is impossible to initialize the model with diffrenet database.
$mymodel = Jelly::factory('mymodel'); $mymodel->meta()->db('somedatabase'); $mymodel->set($data)->save();
Excpected result: The data of $mymodel is saved in respective table at the database 'somedatabase'.
Actual result: The data of $mymodel is saved in default database instead.