1
0
mirror of synced 2025-02-02 13:31:45 +03:00

Identifier can be empty for MappedSuperclasses

When MappedSuperclass is inspected without identifier column been assigned, always return false. Solves "Undefined offset" notice.
This commit is contained in:
Alex Pogodin 2013-09-22 17:19:51 +03:00 committed by Benjamin Eberlei
parent 3dbe181762
commit 1364b6acc6

View File

@ -1031,6 +1031,9 @@ class ClassMetadataInfo implements ClassMetadata
*/
public function isIdentifier($fieldName)
{
if (0 == count($this->identifier)) {
return false;
}
if ( ! $this->isIdentifierComposite) {
return $fieldName === $this->identifier[0];
}