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

[eluser]robmcm[/eluser]
Hi,

I have a system similar to an online store.

Currently I have a model for each table in my database, such as order, item, address, user.

I want to create a model for a total order, that has the user, their order, the item and their address (this is theoretical, so please don't ask why Wink ).

Ideally I would create a model for order, that loaded in related tables. Does this sound normal, and does anyone have any examples.

Also I have noticed that most example models return the SQL result set, doesn't it make more sense to return an instance(s) of the model(s) its self, that is built from the query results?

I don't want to break the use of scaffolding, by changing the default methods (although I guess I could create new ones Smile )

Thanks for you help

Rob


Messages In This Thread
Model questions - by El Forum - 10-14-2008, 02:45 PM
Model questions - by El Forum - 10-14-2008, 03:26 PM
Model questions - by El Forum - 10-14-2008, 04:13 PM
Model questions - by El Forum - 10-14-2008, 06:25 PM
Model questions - by El Forum - 10-15-2008, 01:01 AM
Model questions - by El Forum - 10-15-2008, 01:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB