Open peter-gribanov opened 3 years ago
The problem has been resolved. The reason turned out to be in the incorrectly configured second level cache.
doctrine:
orm:
entity_managers:
default:
second_level_cache:
regions:
questionnaire_region:
lifetime: 86400
cache_driver:
type: pool
id: doctrine_second_level # this service has been renamed
Another problem turned out to be that i specified the caching of a related entity for which the caching region was not configured.
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="questionnaire")
* @ORM\Entity
* @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="questionnaire_region")
*/
class Questionnaire
{
/**
* @ORM\Cache(usage="NONSTRICT_READ_WRITE") # need remove this line
* @ORM\OneToOne(targetEntity="Family", fetch="EAGER")
* @ORM\JoinColumn(name="family_id", referencedColumnName="id", nullable=false)
*
* @var Family
*/
private Family $family;
// ...
}
use Doctrine\ORM\Mapping as ORM;
/**
* Caching not configured
*
* @ORM\Table(name="family")
* @ORM\Entity
*/
class Family
{
// ...
}
But there is still a problem with the fact that a method is called which is not in the interface. This error is not informative at all. I spent 2 days trying to find the problem.
Very strange bug after recent update.
Error at this line in AbstractEntityPersister.
The method
UnitOfWork::getEntityPersister()
returnDoctrine\ORM\Persisters\Entity\EntityPersister
, which does not supportstoreEntityCache()
method.Stack Trace