mailpoet
/
vendor-prefixed
/
doctrine
/
orm
/
src
/
Persisters
/
MatchingAssociationFieldRequiresObject.php
Collection
9 months ago
Entity
8 months ago
Exception
9 months ago
MatchingAssociationFieldRequiresObject.php
9 months ago
PersisterException.php
9 months ago
SqlExpressionVisitor.php
9 months ago
SqlValueVisitor.php
9 months ago
index.php
9 months ago
MatchingAssociationFieldRequiresObject.php
14 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Persisters; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use MailPoetVendor\Doctrine\ORM\Exception\PersisterException; |
| 6 | use function sprintf; |
| 7 | final class MatchingAssociationFieldRequiresObject extends PersisterException |
| 8 | { |
| 9 | public static function fromClassAndAssociation(string $class, string $associationName) : self |
| 10 | { |
| 11 | return new self(sprintf('Cannot match on %s::%s with a non-object value. Matching objects by id is ' . 'not compatible with matching on an in-memory collection, which compares objects by reference.', $class, $associationName)); |
| 12 | } |
| 13 | } |
| 14 |