[eluser]danmontgomery[/eluser]
[quote author="bunal" date="1263953597"]Hi Igniters,
I have 2 model which are modelA and modelB
Sometimes because of the logic i may need to access methods of ModelA from ModelB and vica versa.
So i am loading the ModelB in the contructor of ModelA and load ModelA in the contructor of ModelB that causes loopback?
How to prevent this from being happening?[/quote]
Don't load them in the constructor, load them in the functions you need them
Code:
$ci =& get_instance();
$ci->load->model("modelA");
$ci->modelA->some_function();