diff --git a/src/AbstractMySqlGateway.php b/src/AbstractMySqlGateway.php index f93a6c8..2242c10 100644 --- a/src/AbstractMySqlGateway.php +++ b/src/AbstractMySqlGateway.php @@ -31,7 +31,7 @@ abstract class AbstractMySqlGateway extends AbstractPaginableGateway { /** - * @var Link[] + * @var Link[][] */ protected $links; @@ -59,7 +59,8 @@ public function getLinks($method = self::ALL) $links = []; foreach ($this->links as $key => $pool) { - if ($method & $key) { + // a PERSIST-only link won't be selected for general WRITE + if ($method & $key && $key >= $method) { /** @var Link $link */ foreach ($pool as $link) { if ($link->runFilters()) {