Skip to content

Commit 6c95962

Browse files
committed
fixed pull ignore castables
1 parent 6ec5bf5 commit 6c95962

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Jenssegers/Mongodb/Query/Builder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,9 @@ public function pull($column, $value = null)
784784
if (is_array($column)) {
785785
$query = [$operator => $column];
786786
} else {
787+
// TODO: deal with arrays ($batch)
788+
// TODO: fix push() as well
789+
$value = $this->isCastableToObjectId($column) ? $this->convertKey($value) : $value;
787790
$query = [$operator => [$column => $value]];
788791
}
789792

0 commit comments

Comments
 (0)