View Single Post
  #1 (permalink)  
Old 10-01-2007, 11:05 PM
Bootle Bootle is offline
Junior Member
 
Join Date: Oct 2007
Posts: 5
Default zend_db: grasping basic concepts

Just started on the zend framework, and was wondering if every model that requires database access has to extend zend_db_table_row? For instance, if i have an author class, i assume the author finder/ gateway extends zend_db_table? This means that the returned/ found author must extend zend_db_table_row, is that correct? What if the author model contains a collection of books by that author - how is that relationship expressed in terms of zend_db_table and zend_db_table_row? Is it considered good mvc practice to pass models to the view that have a db-accessable interface, or should they be "read-only" objects? Would you always use the zend_db_* interface for db access, or would you ever use pdo directly in a model?



Thanks for any answers, i hope someone can clear this confusion for me
Reply With Quote