From a8453dda89104ce0e2ee9f36491709b942a79c09 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 22 Aug 2017 21:03:14 +0200 Subject: [PATCH] #6284 removing the "WTF" part of the logic - an association cache entry should never ever reach metadata --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index 5fa349933..4057455b3 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -715,6 +715,9 @@ class ClassMetadataInfo implements ClassMetadata */ public function getIdentifierValues($entity) { + if ($entity instanceof AssociationCacheEntry) { + throw new \InvalidArgumentException('WTF DUDE: ' . $entity->class . ' - ' . \serialize($entity->identifier)); + } if ($this->isIdentifierComposite) { $id = [];