2009年7月23日星期四

Re: [fw-mvc] Models can't find Db Adapter when using modules

Hi,

Be sure the Db resource is initialized before the Modules resource.

--  Best regards, Cristian Bichis www.zftutorials.com | www.zfforums.com | www.zftalk.com | www.zflinks.com

Unfortunately, adding the isDefaultTableAdapter line that didn't work. I'm still getting the same error: "No adapter found for Admin_Model_Users" (which extends Zend_Db_Table_Abstract).

I tried adding module specific resources, but that didn't work either.

-Scott

Sebastian Krebs wrote:
Hi  Set isDefaultTableAdapter 	resources.db.isDefaultTableAdapter = 1  Bye, Sebastian  Scott Sowers schrieb:   
Hi,  I'm writing a modular application using modules, but my my Zend_Db_Table_Abstract classes cannot find the DB Adapter which I have set up in my application.ini file as  follows:  resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.frontController.moduleControllerDirectoryName = "controllers" resources.modules[] = "" resources.db.adapter = PDO_MYSQL resources.db.params.host = localhost resources.db.params.username = root resources.db.params.password = password resources.db.params.dbname = dbname  Any suggestions on how I might get the module models to find the DB Adapter?  Thanks, Scott      
   

没有评论: