Skip to content

Commit 79b429a

Browse files
committed
Fix compatibility with MongoDB 4.4
1 parent 72be9c2 commit 79b429a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Schema/Builder.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Closure;
88
use MongoDB\Model\CollectionInfo;
99
use MongoDB\Model\IndexInfo;
10-
use stdClass;
1110

1211
use function array_keys;
1312
use function assert;
@@ -160,7 +159,7 @@ public function getColumns($table)
160159
[
161160
'$group' => [
162161
'_id' => '$fields.k',
163-
'total' => ['$count' => new stdClass()],
162+
'total' => ['$sum' => 1],
164163
'types' => ['$addToSet' => ['$type' => '$fields.v']],
165164
],
166165
],

0 commit comments

Comments
 (0)