Welcome Guest, Not a member yet? Register   Sign In
Model Best Practices
#1

[eluser]Unknown[/eluser]
I have experience with CodeIgniter but I'm still a little confused as to the best practice for handling Models. Here's what I got in my DB.
I have an Orders Table that has a one to many Relationships to Jobs which has a one to many relationship to Assignments which has a one to many relationship to Responses.

Ie 1 order could have 2 jobs which could have 5 assignments each which could have 10 responses per assignment.

My question. Should my Object model, which is in a sense, the "parent" model, have as one of its properties, a Jobs object which would contain all the info about the Jobs for that Object, and one of the Jobs properties be a Assignments object that has all the Assignment info, etc. Is this getting too much information or is this a good practice for Models, so that way I could just load the Order Model with an Order_id and then be able to access all of the sub information below it? or is there a better way? Thanks




Theme © iAndrew 2016 - Forum software by © MyBB