I have TYPO3 extension with some custom function in repository. I have in this model 1:n relation (events is parent and dates are child elements).
I tried to get the beginning date of child elements with
foreach($events as $key => $value) {
echo $value->getDates()->getBeginn();
}
But I get error "Call to undefined method TYPO3\CMS\Extbase\Persistence\ObjectStorage::getBeginn()". How can I initalize the ObjectStorage in repository?
Thanks Martin