I'm creating an input form for my module with form components as recommended by the magento2 documentation.

The uiComponent is displaying on the page however it's throwing this error - where it's showing the namespace for the model rather than the table name.

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'site.Vendor\Module\Model\Slideshow' doesn't exist, query was: SELECT main_table.* FROM Vendor\Module\Model\Slideshow AS main_table WHERE (id = '')

I'm not entirely sure what's the cause of this - or where it's getting the namespace from.

1 Answer 1


The issue was caused by using the namespace as the first argument in _init, for the resource model.

This is because it's injected into the uiComponent via di.xml

Instead use the table name - like below;


namespace Vendor\Module\Model\ResourceModel;

class Slideshow extends 
    protected function _construct()
        $this->_init('vendor_module_slideshow', 'id');

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.