In my extension MyExt
, I mapped the model Page
to pages
table in TYPO3. Firstly it shows me the type mismatch
error, I anyhow went ahead and saved it.
The following things happen:
In my MyExt/Configuration/TypoScript/setup.txt
I have this:
config.tx_extbase.persistence.classes {
Tx_MyExt_Domain_Model_Page {
mapping {
tableName = pages
}
}
}
Is this a bug ? Or something i'm doing wrong ?
This is my /Domain/Model/Page.php
, just a glimpse of it.
class Page extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* uid
* @var int
* @validate NotEmpty
*/
protected $uid;
/**
* title
* @var string
* @validate NotEmpty
*/
protected $title;
/**
* __construct
*
* @return Page
*/
public function __construct() {
//Do not remove the next line: It would break the functionality
$this->initStorageObjects();
}
/**
* Returns the title
*
* @return string $title
*/
public function getTitle(){
return $this->title;
}
}
My /Domain/Repository/PageRepository.php
is
class PageRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
}
Just delete the whole $TCA['pages']
section from the file my_ext/ext_tables.php
, or comment it out.
If set, it overrides most default TCA settings from the TYPO3 core with values from your extension. You probably don't need custom settings for that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With