orm: Call to a member function resolveAssociationEntries() on boolean {"detail":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function resolveAssociationEntries() on boolean at /www/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultQueryCache.php:140)"}

The following mistakes occur occasionally,and I can’t find the solution

Call to a member function resolveAssociationEntries() on boolean {"detail":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function resolveAssociationEntries() on boolean at /www/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultQueryCache.php:140)"}

version: doctrine/orm V2.6.0 in DefaultQueryCache.php at line 140

        $entries   = $region->getMultiple($cacheKeys);
        // @TODO - move to cache hydration component
        foreach ($cacheEntry->result as $index => $entry) {
            $entityEntry = is_array($entries) && array_key_exists($index, $entries) ? $entries[$index] : null;

            if ($entityEntry === null) {
                if ($this->cacheLogger !== null) {
                    $this->cacheLogger->entityCacheMiss($regionName, $cacheKeys->identifiers[$index]);
                }

                return null;
            }

I think the parameter $entityEntry sometimes will be false , then occur the mistakes.

change if ($entityEntry === null) to if ($entityEntry === null || $entityEntry === false ) . Is this a good solution ?

I need your help. Thank you very much.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Yes: let’s put it in a test, reproduce the cache behavior there and figure out how to fix it afterwards (and only afterwards! Test comes first.) 😃

I’ll try and reproduce

+1

This issue started happening to me when I switched my redis maxmemory-policy to allkeys-lru

https://aws.amazon.com/premiumsupport/knowledge-center/oom-command-not-allowed-redis/