public function setIdentifier($identifier) { if ($this->identifier && $this->identifier !== $identifier) { throw new MappingException('Cannot map the identifier to more than one property'); } $this->identifier = $identifier; }