Modeling objects with multiple table relationships in Zend Framework

前端 未结 5 1167
难免孤独
难免孤独 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:05

    In a nutshell I would create a model for each table, not one model that accesses all three. I would then define relationships between the tables.

    To be honest it seems not very "DRY" to have to create a model for each table but that is what I see done repeatedly in the various examples online and it is what I have done in the handful of projects that I have created with the Zend Framework. If anyone has a better way of handling this I hope the will post it here.

提交回复
热议问题