Michelangelo van Dam’s Blog: Zend Framework data models
Since data mappers have been introduced in Zend Framework Quickstart lot’s of developers get confused about how to use the same pattern with relations. In one of his recent posts Michelangelo van Dam show to model relations between tables and how to create complex data models build from data scattered over few dependent tables.
I was struggling getting my data models (as described in the Zend Framework Quickstart) to work with relations. My first solution was to create a database view that merged that data using joins to collect this data in a format that I could use in my data models. This was going great until I looked at my database where it contained over 20 views (along with 20 data models, mappers and db table gateways) ! So I said to myself there had to be another way.
His post is interesting reading for developers who would like to follow data mappers pattern presented in Zend Framework Quickstart and keep their code clean.