[TYPO3-mvc] create saves empty objects

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Tue Jan 17 14:37:45 CET 2012


Hi there!

Some problems with saving my objects. Maybe I don't understand the way how
to make new objects and save them.

At first I think I have to explain the structure: There is an object called
accreditation, it has two child-objects: feuser and person. The create
writes accreditation correctly to the database. The childobjects are
assigned correctly, but these are empty. For example I post here some
snippets of creating a feuser:

$this->accreditationRepository->add($newAccreditation);                   //
accreditation
$user = t3lib_div::makeInstance('Tx_PsoaAccredit_Domain_Model_Feuser');   //
new user

$user->setUsername($newAccreditation->getCompany(),$this->feuserRepository->
countByUsername($username));              //generate username by own setter
$user->setTxpsoaaccreditaccreditation($newAccreditation);                 //
assign accreditation to user
$this->feuserRepository->add($user);                                      //
saving?

Please give me the right push to solving my problem.

Thanks

Johannes



More information about the TYPO3-project-typo3v4mvc mailing list