I would like to start working with Zend Framework 2 and need some guidance as to the architecture of the framework. I compared Akrabat's ZF2 tutorial with it's ZF1 equivalent and the main difference I noticed so far seems to be the use of modules. I like the idea with modules as being independent and re-usable pieces of code and am thinking it could help segmenting my application and make it more maintainable. For instance I could have the following URL => module mapping:
http://example.org/products => Products module
http://example.org/services => Services module
http://example.org/oauth => Oauth module
[...]
What I'm confused about, is that some of my modules will share the same underlying database resources (e.g. both Products and Services use the same table for comments) and therefore the same database models. Accordingly, I'm wondering:
Where should I put my database models when those are used by multiple modules?