InvalidFindByCall.php
14 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Repository\Exception; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use MailPoetVendor\Doctrine\ORM\Exception\ORMException; |
| 6 | use MailPoetVendor\Doctrine\ORM\Exception\RepositoryException; |
| 7 | final class InvalidFindByCall extends ORMException implements RepositoryException |
| 8 | { |
| 9 | public static function fromInverseSideUsage(string $entityName, string $associationFieldName) : self |
| 10 | { |
| 11 | return new self("You cannot search for the association field '" . $entityName . '#' . $associationFieldName . "', " . 'because it is the inverse side of an association. Find methods only work on owning side associations.'); |
| 12 | } |
| 13 | } |
| 14 |