Hi I am fairly new to Zend framework.
I am working with a tutorial found here:
http://akrabat.com/zend-framework-tutorial/.
In order to explore more, I created another table in my database called recordLabel which contains an id, a name and an address.
While after many trials I finally managed to do my join, I realize that the code for it was implemented in the Controller.
My question is a simple one, is it not better for this code that manages data to sit in a Model rather than a Controller ?
I have to models: Albums and RecordLabel, in which of these should it sit then ?
As
one artistcan have manyalbumsand each one have a singlerecord labelI would put this query in thealbummodel part of a get method like :If on the other hand, an
albumcan have many releases on different labels, I would put it in therecord label, part of a methodgetRecordLabelByAlbum($albumId).