Note that there are some explanatory texts on larger screens.

plurals
  1. POZend Db DependentRowset Magic Method
    primarykey
    data
    text
    <p>I'm trying to use Zend Db findBy() magic method, but it gives me this error:</p> <pre><code>Application error Exception information: Message: File "Game.php" does not exist or class "Game" was not found in the file Stack trace: #0 C:\Zend\ZendServer\share\ZendFramework\library\Zend\Db\Table\Row\Abstract.php(872): Zend_Db_Table_Row_Abstract-&gt;_getTableFromString('Game') #1 C:\Zend\ZendServer\share\ZendFramework\library\Zend\Db\Table\Row\Abstract.php(1154): Zend_Db_Table_Row_Abstract-&gt;findDependentRowset('Game', NULL, NULL) #2 C:\Zend\Apache2\htdocs\dev.gamenomad.com\application\controllers\GameController.php(125): Zend_Db_Table_Row_Abstract-&gt;__call('findGame', Array) #3 C:\Zend\Apache2\htdocs\dev.gamenomad.com\application\controllers\GameController.php(125): Zend_Db_Table_Row-&gt;findGame() #4 C:\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Action.php(516): GameController-&gt;platformAction() #5 C:\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php(295): Zend_Controller_Action-&gt;dispatch('platformAction') #6 C:\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard-&gt;dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #7 C:\Zend\ZendServer\share\ZendFramework\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front-&gt;dispatch() #8 C:\Zend\ZendServer\share\ZendFramework\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap-&gt;run() #9 C:\Zend\Apache2\htdocs\dev.gamenomad.com\public\index.php(26): Zend_Application-&gt;run() #10 {main} Request Parameters: array ( 'controller' =&gt; 'game', 'action' =&gt; 'platform', 'x' =&gt; '2', 'module' =&gt; 'default', ) </code></pre> <p>Seems like it doesn't detect Game.php even though it exists inside /application/models/DbTable/Game.php</p> <p>Are there any rules or exceptions I am missing? </p> <p>This is my code</p> <pre><code>public function platformAction() { // action body $platform = intval($this-&gt;_request-&gt;getParam('x')); $platformTable = new Application_Model_DbTable_Platform(); $xbox360 = $platformTable-&gt;find($platform)-&gt;current(); //$games = $xbox360-&gt;findDependentRowset('Application_Model_DbTable_Game'); $games = $xbox360-&gt;findGame(); if(isset($games)) { if(count($games)&gt;0) { foreach($games as $game) { echo "{$game-&gt;name}&lt;br /&gt;"; } } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload