[TYPO3-mvc] updateAction not saving field extending another Model
Søren Malling
soren.malling at gmail.com
Thu Feb 18 14:25:21 CET 2010
Hi,
I've created a Model extending the FrontendUserRepository
class Tx_Groupmembers_Domain_Model_Member extends
Tx_Extbase_Domain_Model_FrontendUser {
.....
}
and added the field in ext_tables.php and ext_tables.sql
(tx_groupmembers_domain_model_number) and it's shown perfectly in the
backend.
In my frontend, I can't get the content of the field nor save to the field.
In my model the field is described as
/**
* Member number
* @var string
* @validate NotEmpty
*/
protected $number;
and my updateAction is as follows
public function updateAction(Tx_Groupmembers_Domain_Model_Member $member) {
$this->memberRepository->update($member);
$this->flashMessages->add('Your member details have been saved');
$this->redirect('index');
}
and I got setters and getters for the field. But nothing is updated in
the database.
When i print_r from the form i get the following value for the field
[number] => 23 but wouldn't that be tx_groupmembers_domain_model?
So in short, what is the correct way to name a field extending a
table, in my model?
Regards,
Søren
More information about the TYPO3-project-typo3v4mvc
mailing list