typo3 6.2.x - creating extension not working: Table does not exist -


i'm new in typo3 cms , i'm creating new extension following error when try execute query repository.

1247602160: table 'hr.tx_hr_domain_model_job' doesn't exist

this controller

<?php namespace hr\hr\controller;  class hrcontroller extends \typo3\cms\extbase\mvc\controller\actioncontroller {      protected $jobsrepository;     protected $objectmanager;      public function initializeaction()     {         parent::initializeaction();          $this->objectmanager  = \typo3\cms\core\utility\generalutility::makeinstance('typo3\\cms\\extbase\\object\\objectmanager');         $this->jobsrepository = $this->objectmanager->get('hr\\hr\\domain\\repository\\jobrepository');     }      /**      * jobs list      *      * @return void      */     public function listaction()     {         $this->view->assign('jobs', $this->jobsrepository->findall());     }  } 

and job repository class

<?php  namespace hr\hr\domain\repository;  class jobrepository extends \typo3\cms\extbase\persistence\repository {  } 

this content of ext_tables.sql file

# # table structure table 'tx_hr_job' #  create table if not exists `tx_hr_job` (   `jobid` int(10) not null,   `kunde` varchar(255) not null,   `titel` varchar(255) not null,   `ort` varchar(255) not null,   `volltext` text not null,   `bundesland` varchar(255) not null,   `region` varchar(255) not null,   `branche` varchar(255) not null,   `berufsgruppe` varchar(255) not null,   `stellenart` varchar(255) not null,   `datum` date not null,     primary key (`jobid`) ); 

any help?

by convention table name should tx_hr_domain_model_job, alternatively can use table mapping, tricky.

use extension_builder kickstarting ext - it's great tool creating basic models, can drag'n'drop - relations, etc.

what's more important create required pieces of code, models, repositories tca configs etc you'll see what's valid approach.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -