Modeling objects with multiple table relationships in Zend Framework

前端 未结 5 1171
难免孤独
难免孤独 2020-12-04 11:19

I\'m toying with Zend Framework and trying to use the \"QuickStart\" guide against a website I\'m making just to see how the process would work. Forgive me if this answer is

5条回答
  •  情书的邮戳
    2020-12-04 12:12

    Just a few notes straight off the bat:

    The first User table, seems more like a Person table, except for the auth method, but you could put that in the User_Password table, which you could probably rename User. The User_Metadata table seems like it could just be amalgamated with the User_Password/User table.

    Now, even without those changes, you have three distinct tables, with three distinct concepts, if you model each of those separate as different classes, and then had a UserModel class as a facade of sorts to access each, it would likely make it easier.

提交回复
热议问题