I'm creating a simple module that contains two tables named:

  • city_faq
  • city_faq_section

I'm having a difficult time joining city_faq with city_faq_section. Each time I try to do so, I receive the following error:

Can't retrieve entity config: city_faq/city_faq_section.

Additional Information


After a few hours of debugging, it appears that the problem may stem from the model calling the collection, City_Faq_Model_Faq. In its constructor, I have $this->_init('city_faq/faq');, but this may not be correct. Would this cause the above error?

Here is my join call:

/** $this refers to City_Faq_Model_Resource_Faq_Collection **/
        array('sections' => $this->getTable('section')),
        'main_table.section_id = sections.section_id',
    ->setOrder('sections.sort', self::SORT_ORDER_ASC)
    ->setOrder('main_table.sort', self::SORT_ORDER_ASC);

Clearly, I'm choking on $this->getTable('section') - however, if add the following right above the join call, I see the correct table in the log file (city_faq_section), so it appears that the config is read correctly.


The pertinent section of my config.xml looks like this:


Both tables (city_faq and city_faq_section) exist. I'm sure I'm missing something silly. What's interesting, is when completing the join call, the class City_Faq_Model_Resource_Faq is instantiated but City_Faq_Model_Resource_Section is not. This leads me to believe that this is the issue.

Things I've tried

  • I've tried $this->getTable('city_faq/section')
  • I've even tried setting directly via $this->getTable('city_faq_section')

File Structure

                - Faq
                    . Collection.php
                . Faq.php
                . Section.php
            . Faq.php
            . Section.php

                . mysql4-install-0.2.0.php
            . config.xml
  • 1
    Try with $this->getTable('city_faq/section') instead of $this->getTable('section')
    – Marius
    Commented Dec 16, 2014 at 15:43
  • Thanks @Marius - Tried that too (should have mentioned that), but the error is still the same and Mage::log($this->getTable('city_faq/section')); still outputs the correct table city_faq_section. I'll update my question with things I've tried. Commented Dec 16, 2014 at 15:45
  • Strange. Are you sure the problem does not come from an other piece of code? Just asking to make sure.
    – Marius
    Commented Dec 16, 2014 at 15:47
  • I guess it must be - The installer script uses $installer->getTable('city_faq/section') and the table is installed correctly as well. I'll keep digging. Commented Dec 16, 2014 at 16:01

1 Answer 1


This turned out to be a fairly silly mistake. Since my module will be similar in structure to the Mage_Poll plugin, I used that as a reference.

Rather than:

        array('sections' => $this->getTable('section')),

It should have been:

        array('sections' => $this->getTable('section')),

Now it makes sense why basically everything in the module was working, except for the join statement. Aye...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.