I understand. I dont have a lot of fields to return really, mostly ints and a few varchars but always small ones so I guess I can save myself some time and just return everything, easy.
Christopher wrote:PS - I tend to have model methods like getSomeSpecificData() that return only the fields I need from one or more tables for that specific need.
I get this a lot too. I have bunches of those in my models and I am really scratching my head about what to do with them. On one hand, if I remove them and do an individual query each time, I will regain my models to some extent. Currently, most of my models are really just "getters" where each method just does a specific DB select. This just seams so...dirty.
But, if I remove those getter models, it is going to be painful to keep track of all the individual queries and if a change is made it will be painful.
I guess I am really trying to make my models to be more class-like but I keep ending up with mostly procedural code that is wrapped in functions and those functions just happen to be in a class. I am always trying to get away from this but I always end up back there. Any hints or tips for better structure?