Welcome Guest, Not a member yet? Register   Sign In
Problems with models calling other models
#2

[eluser]Clooner[/eluser]
[quote author="swissbastian" date="1239017715"]Is it bad practice to call a model in another model?[/quote]

I would suggest that you create an my_model by extending the model and put the function which you are calling in multiple models in that one. When creating a model extend it from my_model. This way you won't have duplicate code and your code won't be messy.

Hope this helps. There is an explanation on how to extend the models in the user guide.


Messages In This Thread
Problems with models calling other models - by El Forum - 04-06-2009, 12:35 AM
Problems with models calling other models - by El Forum - 04-06-2009, 01:28 AM
Problems with models calling other models - by El Forum - 04-06-2009, 02:34 AM
Problems with models calling other models - by El Forum - 04-06-2009, 02:43 AM
Problems with models calling other models - by El Forum - 04-06-2009, 02:58 AM
Problems with models calling other models - by El Forum - 04-06-2009, 03:28 AM
Problems with models calling other models - by El Forum - 04-06-2009, 04:32 AM
Problems with models calling other models - by El Forum - 04-06-2009, 04:45 AM
Problems with models calling other models - by El Forum - 04-06-2009, 06:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB