[TYPO3-mvc] create saves empty objects
Johannes C. Schulz - EnzephaloN IT-Solutions
info at enzephalon.de
Wed Jan 18 13:48:19 CET 2012
Hello again.
After some thinking, I tried an other way to fill my properties-objects of
"accreditation". From new-action I receive "newAccreditation"-object. Now I
try to write values to newAccreditation->user (which is an extend of
Tx_Extbase_FrontendUser):
$newAccreditation->user->setPassword();
But this also doesn't work, cause "user" is a protected property.
I really do not understand how to write into property-objects. Creatiing
seems to work, but all of them are empty.
Do you have some help for me?
Best regards
Johannes
-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
[mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
Johannes C. Schulz - EnzephaloN IT-Solutions
Gesendet: Dienstag, 17. Januar 2012 14:38
An: 'TYPO3 v4 MVC project'
Betreff: [TYPO3-mvc] create saves empty objects
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
_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
More information about the TYPO3-project-typo3v4mvc
mailing list