CodeIgniter icon indicating copy to clipboard operation
CodeIgniter copied to clipboard

Model's Object Name Collision

Open iukky opened this issue 13 years ago • 1 comments

$this->load->model('users1_model', 'users');

... do something ...

$this->load->model('users2_model', 'users');

Now, "$this->users" is representing "users1_model" instead of "users2_model"

Is it need to check the object class when the object is created in CI loader?

PS: CI_Loader line 260 - 263

iukky avatar Jan 22 '13 05:01 iukky

Read a documentation of CodeIgniter

http://ellislab.com/codeigniter/user-guide/general/models.html#loading

italodom avatar Jan 22 '13 21:01 italodom