1
0
mirror of synced 2025-01-24 09:11:40 +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
parent 2089df36e3
commit a75d73b889

View File

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