Welcome Guest, Not a member yet? Register   Sign In
Creating multiple instances of a model
#9

(04-28-2016, 10:45 AM)kilishan Wrote: As for Collections, the are what they sound like, collections of that item. Often times, they will have additional functionality that is helpful, but I've found that 90% of the time an array works just as well as a Collection, with less abstractions, less work to duplicate the same features you get by having an array, less overhead, etc. Sometimes they're helpful, but I personally stay away from worrying about that until you need it.

I think I follow.  So, if a collection is just an array of customers in this example, what creates the array?  The Customer_model ?  If so that's fine, I just wasn't sure whether a model should be responsible for both single entities, and also a collection of those entities.
Reply


Messages In This Thread
RE: Creating multiple instances of a model - by CINewb - 04-28-2016, 11:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB