Hallo Forum
Ich plage mich schon seit geraumer Zeit mit einem hartnäckigen Problem. Meine Extension erweitert die fe_user Tabelle:
[code]CREATE TABLE fe_users (
tx_app_domain_model_customer_state int(11) DEFAULT '0' NOT NULL,
tx_app_domain_model_customer_flag_newsletter int(11) unsigned DEFAULT '0',
tx_app_domain_model_customer_bank_account int(11) unsigned DEFAULT '0',
...
)
[/code]
Mit folgenden Model:
[code]/**
* Customer
*/
class Customer extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUser {
/**
* state
* @validate \Vendor\App\Domain\Validator\CustomerStateValidator
* @var \Vendor\App\Domain\Enums\CustomerState
*/
protected $state = 0;
/**
* flagNewsletter
*
* @var bool
*/
protected $flagNewsletter = false;
/**
* bankAccount
*
* @var \Vendor\App\Domain\Model\BankAccount
*/
protected $bankAccount = null;
...
}
[/code]
im setup sieht das wie folgt aus:
[code]//extend Customer
TYPO3\CMS\Extbase\Domain\Model\FrontendUser {
subclasses {
0 = Vendor\App\Domain\Model\Customer
}
}
Vendor\App\Domain\Model\Customer {
mapping {
recordType = 0
tableName = fe_users
columns {
tx_app_domain_model_customer_state.mapOnProperty = state
tx_app_domain_model_customer_flag_newsletter.mapOnProperty = flag_newsletter
tx_app_domain_model_customer_bank_account.mapOnProperty = bank_account
}
}
[/code]
In mein TCA/Override/fe_users.php sind die Spalten so annotiert:
[code]'tx_app_domain_model_customer_flag_newsletter' => [
'config' => [
'type' => 'check',
'items' => [
'1' => [
'0' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled'
]
],
'default' => 0,
],
...
'tx_app_domain_model_customer_state' => [
'config' => [
'type' => 'input',
'size' => 4,
'eval' => 'int'
]
],
...
'tx_app_domain_model_customer_bank_account' => [
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_app_domain_model_bankaccount',
'minitems' => 0,
'maxitems' => 1,
]
],
...
[/code]
Seltsamerweise wird der "State" persistiert, aber alles andere nicht. Auch die verweise auf andere Models funktionieren nicht mehr. Das Model hat bereits funktioniert, bevor ich die fe_user Tabelle erweitert habe.
Bitte um Hilfe.
mfg