[TYPO3-mvc] classes not saved into the db
Zalán Somogyváry
zalan at gmx.net
Tue Jun 28 15:31:11 CEST 2011
Hi list,
Extbase does not seem to persist all the subclasses of an aggregate root....
I have a competition object as aggregate root, which has many students (the participants of the competition), but when I try to save the students data to the db extbase goes on with no error but without saving the data into the db....
Here is my createAction:
/**
* Saves the data to the database.
*
* @param Tx_MyExtension_Domain_Model_Competition $competition
* @param Tx_MyExtension_Domain_Model_Student $student
*/
public function createAction(Tx_MyExtension_Domain_Model_Competition $competition, Tx_MyExtension_Domain_Model_Student $student){
if($competition === NULL) return 'Sorry. You can\'t register now, because there are no competitions at the moment.';
$competition->addStudent($student);
$this->redirect('show',NULL,NULL,array('competition' => $competition));
}
Can anybody give me a hint? I think I've configured the setup.txt well:
# FE Plugin configuaration
plugin.tx_tucompetitions {
persistence {
storagePid = {$plugin.tx_myextension.persistence.storagePids}
classes {
Tx_Extbase_Domain_Model_FrontendUser {
subclasses {
Tx_MyExtension_Domain_Model_WebUser = Tx_MyExtension_Domain_Model_WebUser
}
}
Tx_MyExtension_Domain_Model_WebUser {
newRecordStoragePid = {$plugin.tx_myextension.persistence.webUserStoragePid}
mapping {
tableName = fe_users
recordType = Tx_MyExtension_Domain_Model_WebUser
}
}
Tx_MyExtension_Domain_Model_Student {
newRecordStoragePid = {$plugin.tx_myextension.persistence.studentStoragePid}
}
}
}
}
Best regards,
Zalán Somogyváry
More information about the TYPO3-project-typo3v4mvc
mailing list