Welcome Guest, Not a member yet? Register   Sign In
Loading a model within a model.
#4

[eluser]MPress[/eluser]
That doesn't seem to work for me. I believe what's going on is that loading a model using $this->load->model is actually creating the original reference in the CI instance and these references are only copied over (localized) to the model upon construction. Therefore, any other model loaded post-construction of the subject model will only have a reference in the CI instance (controller) and not in the model itself. What could be happening in your case is that these models were already previously loaded and so the references have already been localized within the subject model (on construction).

My workaround fixes this problem, but if something else is going on here, perhaps it is unnecessary.


Messages In This Thread
Loading a model within a model. - by El Forum - 10-30-2007, 04:59 PM
Loading a model within a model. - by El Forum - 10-30-2007, 05:26 PM
Loading a model within a model. - by El Forum - 10-30-2007, 05:35 PM
Loading a model within a model. - by El Forum - 10-30-2007, 08:51 PM
Loading a model within a model. - by El Forum - 10-30-2007, 11:44 PM
Loading a model within a model. - by El Forum - 10-31-2007, 05:28 AM
Loading a model within a model. - by El Forum - 10-31-2007, 12:08 PM
Loading a model within a model. - by El Forum - 10-31-2007, 12:11 PM
Loading a model within a model. - by El Forum - 10-31-2007, 01:45 PM
Loading a model within a model. - by El Forum - 10-31-2007, 01:54 PM
Loading a model within a model. - by El Forum - 10-31-2007, 02:26 PM
Loading a model within a model. - by El Forum - 10-31-2007, 02:27 PM
Loading a model within a model. - by El Forum - 10-31-2007, 03:58 PM
Loading a model within a model. - by El Forum - 10-31-2007, 04:10 PM
Loading a model within a model. - by El Forum - 10-31-2007, 04:26 PM
Loading a model within a model. - by El Forum - 10-31-2007, 05:03 PM
Loading a model within a model. - by El Forum - 11-02-2007, 04:34 AM
Loading a model within a model. - by El Forum - 11-02-2007, 07:14 AM
Loading a model within a model. - by El Forum - 11-02-2007, 12:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB