Issue Bug Closed

#99408@Extbase\ORM\Lazy generate an error if I use type property

Florian Rival 12/21/22, 17:33 updated 12/21/22, 19:49

Description

If I try to use Lazy loading with a property like that :

/**
 * @var ?Eventtype
 * @Extbase\ORM\Lazy
 */
protected Eventtype $eventType;

Then I have this error message :

> Cannot assign TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy to property Site\SiteNews\Domain\Model\News::$eventType of type Site\SiteNews\Domain\Model\Eventtype

If I remove the type, then the error disappears :

/**
 * @var ?Eventtype
 * @Extbase\ORM\Lazy
 */
protected $eventType;

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.