From be6c023d10e56c4f6f9326c6946750798970cde6 Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Sun, 15 Oct 2017 12:53:13 +0200 Subject: [PATCH] Automatically set lookupFields based on the entities identifier fields --- src/DoctrineWriter.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/DoctrineWriter.php b/src/DoctrineWriter.php index a481ad6..9673119 100644 --- a/src/DoctrineWriter.php +++ b/src/DoctrineWriter.php @@ -99,6 +99,8 @@ public function __construct( } else { $this->lookupFields = [$index]; } + } else { + $this->lookupFields = $this->objectMetadata->getIdentifierFieldNames(); } if (!method_exists($this->objectRepository, $lookupMethod)) {