ZF-6907: Wrong file include when calling the magic method of Zend_Db_Table_Row_Abstract

Issue Type: Bug Created: 2009-06-04T14:49:13.000+0000 Last Updated: 2009-06-05T04:00:05.000+0000 Status: Resolved Fix version(s): Reporter: Melvin Groenhoff (regx) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Db_Table

Related issues: Attachments:


See example 15.143.…

The magic method "findBugsByEngineer();" calls the "findDependentRowset()" method and passes the class name as string. This wil attempt to include the file "Bugs.php" with class "Bugs"

But when using the resource autoloader, our db tables become prefixed with something like "My_Model_DbTable_".

So when you call "findMy_Model_DbTable_BugsByEngineer();" it will include the right file and class.


Posted by Matthew Weier O'Phinney (matthew) on 2009-06-05T03:59:45.000+0000

When you use the "findBy()" methods, the dependent table noted must be the full class name as Zend_Db_Table_Row_Abstract does not implement a plugin loader. This is why the last example works but your first does not.

A slightly more readable syntax for those times you have long names is to use findDependentRowset() with the explicit class name and rule.

Marking as won't fix as the component is behaving entirely as designed.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.