Lukas W.
Well-known member
I'm creating a relation on demand if it does not already exist. However, if I then try to access it on a later point, it will still be null, so XF throws an error. Is there a way to refresh the entity to force XF to reload it?
Currently using this code:
Currently using this code:
PHP:
/** @var \EventSystem\Entity\EventEntry $eventData */
$eventData = $this->EventSystemData;
if(!$eventData) {
$eventData = $this->em()->create('EventSystem:EventEntry');
$eventData->user_id = $this->user_id;
$eventData->save();
}
Last edited: