Browse Source

Merge pull request #14133 from Zuluru/3.x

Only try to clean entities
Mark Story 6 years ago
parent
commit
7605b838cc
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;
                 });