Welcome Guest, Not a member yet? Register   Sign In
Confusion calling model functions
#7

[eluser]jedd[/eluser]
[quote author="TheFuzzy0ne" date="1246151745"]
Your model's file name should be lower case, and the model name you pass to the loader should also be lowercase.[/quote]

One of us has been doing something wrong for a while, then Wink

[url="http://ellislab.com/codeigniter/user-guide/general/models.html#loading"]CI User Guide - Models[/url]


Didn't even notice that the constructor wasn't calling MY_Controller - yes, that will confuse things.

Agree with the camel case - ugly thing, hard to read, but mostly it's just out of style spec for CI - so you'll have Fun when you start assimilating other people's code.

Models being plural, controllers being singular - an interesting approach. Hadn't heard of that one.

Models should reflect a coherent lump of your data - it may be a table, it may be a few dozen tables. Controllers reflect a grouping of activities. There may be a 1:1 relationship between a controller and a model, but I think people's eagerness to construct that relationship often leads them down (ultimately) confusing design paths. Of course, I may be wrong on this, and may be the confused one. Something to think about, anyway.


Messages In This Thread
Confusion calling model functions - by El Forum - 06-27-2009, 02:13 AM
Confusion calling model functions - by El Forum - 06-27-2009, 02:29 AM
Confusion calling model functions - by El Forum - 06-27-2009, 03:23 AM
Confusion calling model functions - by El Forum - 06-27-2009, 05:12 AM
Confusion calling model functions - by El Forum - 06-27-2009, 01:09 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:15 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:40 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:48 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:52 PM
Confusion calling model functions - by El Forum - 06-27-2009, 03:06 PM
Confusion calling model functions - by El Forum - 06-27-2009, 03:41 PM
Confusion calling model functions - by El Forum - 06-27-2009, 04:07 PM
Confusion calling model functions - by El Forum - 06-27-2009, 04:58 PM
Confusion calling model functions - by El Forum - 06-27-2009, 05:23 PM
Confusion calling model functions - by El Forum - 06-27-2009, 05:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB