Skip to content

Commit

Permalink
fix: unset _parent before saving
Browse files Browse the repository at this point in the history
  • Loading branch information
danjohnson95 committed Apr 2, 2020
1 parent 7011e9c commit 987158a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Searchable.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public function toSearchableArray()
$array['id'] = $this->id;

unset($array['_id']);
unset($array['_parent']);

foreach ((array) $this->indexAsChildDocuments as $field) {
$subDocuments = $this->$field ?? [];
Expand Down

0 comments on commit 987158a

Please sign in to comment.