Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8442359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:49:39+00:00 2026-06-10T08:49:39+00:00

I have two table each with Class Albums and Category as below : class

  • 0

I have two table each with Class Albums and Category as below :

class Application_Model_DbTable_Albums extends Zend_Db_Table_Abstract
{

    protected $_name = 'albums';
    private $_custom_message = '';

    protected $_referenceMap = array(
        'CategoryTypes' => array(
            'columns' => array('category_id'),
            'refTableClass' => 'Category',
            'refColumns' => array('id')
        )
    );
}

class Application_Model_DbTable_Category extends Zend_Db_Table_Abstract {

protected $_name = 'category';

protected $_dependentTables = array('Albums');
}

In my IndexController edit action, I have the following code:

$category = new Application_Model_DbTable_Category();

$cat_id = $category->find(1);
$cat_3 = $cat_id->current();

$user_cat = $cat_3->findDependentRowset('Albums');

And I get this Exception message.Commented out the $user_cat will not get the Exception Msg

Exception information:

Message: File "Albums.php" does not exist or class "Albums" was not found in the file
Stack trace:

#0 C:\Program Files\Zend\Apache2\htdocs\zf-tutorial\library\Zend\Db\Table\Row\Abstract.php(872): Zend_Db_Table_Row_Abstract->_getTableFromString('Albums')
#1 C:\Program Files\Zend\Apache2\htdocs\zf-tutorial\application\controllers\IndexController.php(187): Zend_Db_Table_Row_Abstract->findDependentRowset('Albums')
#2 C:\Program Files\Zend\Apache2\htdocs\zf-tutorial\library\Zend\Controller\Action.php(516): IndexController->editAction()
#3 C:\Program Files\Zend\Apache2\htdocs\zf-tutorial\library\Zend\Controller\Dispatcher\Standard.php(295): Zend_Controller_Action->dispatch('editAction')
#4 C:\Program Files\Zend\Apache2\htdocs\zf-tutorial\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#5 C:\Program Files\Zend\Apache2\htdocs\zf-tutorial\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch()
#6 C:\Program Files\Zend\Apache2\htdocs\zf-tutorial\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#7 C:\Program Files\Zend\Apache2\htdocs\zf-tutorial\public\index.php(49): Zend_Application->run()
#8 {main}  

My Albums Class is there but don’t know why it says cannot find the class or file

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:49:40+00:00Added an answer on June 10, 2026 at 8:49 am

    first this is incorrect:

    protected $_referenceMap = array(
            'CategoryTypes' => array(
                'columns' => array('category_id'),
                'refTableClass' => 'Category',
                'refColumns' => array('id')
            )
        );
    

    refTableClass needs the whole classname, not the file name:

    protected $_referenceMap = array(
            'CategoryTypes' => array(
                'columns' => array('category_id'),
                'refTableClass' => 'Application_Model_DbTable_Category',
                'refColumns' => array('id')
            )
        );
    

    The same holds true for dependentTables:

    protected $_dependentTables = array('Application_Model_DbTable_Albums');
    }
    

    and make doubly sure that the value of the $_name property always is exactly the same as the name of the table the class represents.

    [EDIT]

    $category = new Application_Model_DbTable_Category();
    
    $cat_id = $category->find(1);
    $cat_3 = $cat_id->current();
    //try
    $user_cat = $cat_3->findDependentRowset();
    //or
    $user_cat = $cat_3->findDependentRowset('Application_Model_DbTable_Albums');
    //or
    $user_cat = $cat_3->findDependentRowset(new Application_Model_DbTable_Albums());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have two Modules on each modules i have models with table class,
I have two classes Parent and Child . class Child extends Parent { private
I have two tables: Folder, Files. Each table has 4 fields: ParentID, ID, Name,
Here is the problem: I have two columns in a table that, for each
I've got a table recording views of programs. Each program can have two different
I have a table with two radio buttons for each row, these buttons are
I have a table with two child tables. For each record in the parent
I have a page that displays a table in two different modes. In each
I have implemented inheritance for two parent classes called Table and Field . Each
I have a table which is being dynamically populated, each row contains two textfields

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.