if (!\
is_object($value) ||
$value instanceof \DateTimeInterface
) { return $this->
formatValue($value, self::PRETTY_DATE
);
} if ($value instanceof \Stringable
) { return (string) $value;
} if ($class->
getName() !==
$idClass =
$value::
class) { // non unique value might be a composite PK that consists of other entity objects
if ($em->
getMetadataFactory()->
hasMetadataFor($idClass)) { $identifiers =
$em->
getClassMetadata($idClass)->
getIdentifierValues($value);
} else { // this case might happen if the non unique column has a custom doctrine type and its value is an object
// in which case we cannot get any identifiers for it
$identifiers =
[];
} } else { $identifiers =
$class->
getIdentifierValues($value);
} if (!
$identifiers) {