Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.0
-
Fix Version/s: None
-
Component/s: Zend_Db_Table
-
Labels:None
Description
I was using Zend_Application_Module_Autoloader to autoload my resources.
I created two classes one extending Zend_Db_Table_Abstract (Users) and the other is a custom row class extending Zend_Db_Table_Row_Abstract (User).
When instantiating these class separately there is no problem. However when I use Table class like with a custom row like the one below. It cant find the file. It looks in "model" directory instead of "models";
class Model_DbTable_Users extends Zend_Db_Table_Abstract
{
protected $_name ='user';
protected $_primary = 'id';
protected $_rowClass = 'Model_DbTable_User';
}
I am guessing there is a separate Namespace/path converter somewhere else and it is converting differently than Autoloader.
This may be helpful
\library\Zend\Db\Table\Rowset\Abstract.php(119): Zend_Loader::loadClass('Model_DbRow_Use...')
There is a discussion about this at http://www.nabble.com/Zend-Model-and-quickstart-tt23445168.html
Issue Links
| This issue depends on: | ||||
| ZF-4167 | Zend_Db_Table_Row_Abstract does not properly rely on autoloading |
|
|
|
| This issue duplicates: | ||||
| ZF-3151 | The ZF is not able to use user-defined autoloaders for user-defined classes |
|
|
|
| This issue is related to: | ||||
| ZF-5268 | Change in loader behavoir affects Zend_Db_Table's dependency on loadClass w/ Exception thrown |
|
|
|
| ZF-6497 | relative paths in Zend_Soap_Wsdl |
|
|
|
The problem is not that it's looking in the wrong directory so much as it's not using autoloading – which is an issue throughout the framework currently. We'll be addressing it soon.