Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy-j committed Feb 8, 2017
1 parent 698229e commit 61c4c91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/Spiral/HybridDB/HasDocumentRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,13 @@ protected function handleRollback(): \Closure
$this->instance->delete();
}
} else {
$data = $this->data;
unset($data['_id']);

//Restoring original state
$this->odm->collection($this->class)->updateOne(
['_id' => $this->data['_id']],
['$set' => $this->data]
['$set' => $data]
);
}
} elseif (!empty($this->instance)) {
Expand Down

0 comments on commit 61c4c91

Please sign in to comment.