You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use MongoDB\Laravel\Eloquent\Model;
protected $connection = 'mongodb';
I have error :
This method is not supported by MongoDB. Try "toMql()" instead. {"userId":1,"exception":"[object] (BadMethodCallException(code: 0): This method is not supported by MongoDB. Try "toMql()" instead. at //vendor/mongodb/laravel-mongodb/src/Query/Builder.php:1442)
[stacktrace] #0 //vendor/backpack/crud/src/app/Library/CrudPanel/Traits/Query.php(220): MongoDB\Laravel\Query\Builder->toSql()
What I've already tried to fix it
When i change by ->toMql() instead >toSql() that work !
public function getFilteredQueryCount()
{
// check if the filtered query is different from total query, in case they are the same, skip the count
$filteredQuery = $this->query->toBase()->cloneWithout(['orders', 'limit', 'offset']);
return $filteredQuery->toMql() !== $this->totalQuery->toMql() ? $this->getQueryCount() : null;
}
Is it a bug in the latest version of Backpack?
Yes
The text was updated successfully, but these errors were encountered:
Hello @elgrosboub, thanks for bringing us this report about the issue; we will check about this change on the last version of MongoDB package and fix it.
I will ask the wise @pxpm to check this compatibility.
Bug report
Installed a fresh Laravel 10+ Last Backpack V6 + Last MongoDB Package (https://www.mongodb.com/compatibility/mongodb-laravel-integration)
What I expected to happen
Work.
What happened
When I change connection :
use MongoDB\Laravel\Eloquent\Model;
protected $connection = 'mongodb';
I have error :
This method is not supported by MongoDB. Try "toMql()" instead. {"userId":1,"exception":"[object] (BadMethodCallException(code: 0): This method is not supported by MongoDB. Try "toMql()" instead. at //vendor/mongodb/laravel-mongodb/src/Query/Builder.php:1442)
[stacktrace] #0 //vendor/backpack/crud/src/app/Library/CrudPanel/Traits/Query.php(220): MongoDB\Laravel\Query\Builder->toSql()
What I've already tried to fix it
When i change by ->toMql() instead >toSql() that work !
Is it a bug in the latest version of Backpack?
Yes
The text was updated successfully, but these errors were encountered: