Browse Source

Only try to clean entities

gregs 6 years ago
parent
commit
199693a516
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/ORM/Association.php

+ 3 - 1
src/ORM/Association.php

@@ -1285,7 +1285,9 @@ abstract class Association
             return $results
                 ->insert($property, $extracted)
                 ->map(function ($result) {
-                    $result->clean();
+                    if ($result instanceof EntityInterface) {
+                        $result->clean();
+                    }
 
                     return $result;
                 });