> -----Original Message----- > From: Dan Rossi [mailto:[EMAIL PROTECTED] > > Hi this is a problem if its automatically querying to > building the fields, Ive been using the PEAR DB_DataObject > package exclusevily for the model stuff for years, though id > like to move to PDO / PHP5 and the extension version doesnt > seem like it is updated in a while > http://pecl.php.net/package/DBDO. It generates fields as > variables etc which are usable in the model class so is not > called all the time.
To reduce the frequency with which it queries the table's metadata, you can specify a Zend_Cache object when you create instances of Zend_Db_Table classes. Read the documentation for Zend_Db_Table (http://framework.zend.com/manual/en/zend.db.table.html), in the section "Caching Table Metadata". > Its also married with a package called > FormBuilder for RAD form stuff which is what the admin side > of this project uses, so not sure if its worth migrating that > stuff if ZF also does RAD stuff with Zend_Db_Table or keep it in PHP4. Zend Framework doesn't do RAD-type hookups between forms and tables at this time. We're investigating ways of providing some of that in the future, but it's a long-term effort. We'll probably get there in steps. > Thanks for the tip on generating I'll build a shell script > for that to update them or whatever I guess. Is thats all > thats required, just to have empty classes ? That's the simple case, and it will work, given the defaults that I described regarding table names, primary keys, and column lists. In most cases, you can rely on the default code inherited from the abstract table class which your tables extend. If you need any custom logic in your table classes, you'll have to add it to the skeleton classes. Likewise if you want to declare referential relationships between tables, you need to write these declarations in your table classes (see http://framework.zend.com/manual/en/zend.db.table.relationships.html). Regards, Bill Karwin
