Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.0
-
Fix Version/s: 1.8.2
-
Component/s: Zend_Db_Table
-
Labels:None
Description
Zend_Db_Table_Row_Abstract->findDependentRowset() and Zend_Db_Table_Row_Abstract->findParentRow() rely on Zend_loader::loadClass() for loading dependent and parent tables. This makes it impossible to use autoloading to find these classes and forces the developer to add all paths that may contain DB Table class to be added to the include_path.
In my application I have a custom loader which I registered with Zend_Loader::registerAutoload('My_Model_Loader'). However this loader never gets fired when working with dependent and parent tables because autoloading is not used within Zend_Db_Table_Row_Abstract.
Autoloading should be used before directly trying to load a class. With the proposed MVC filder structure there would be a model folders for each application module. Adding each model folder as an include path is less than ideal. Following a pattern similar to controller actions, it would be reasonable that someone would want to load a model from a specific module.
I'm able to get my application to work just fine by commenting out the try...catch that tries to load the class.
Linking these issue as they report the same problem