mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Make filters work on default MySQL servers to by removing the ONLY_FULL_GROUP_BY sql mode
This commit is contained in:
parent
ffa804404c
commit
467687fd0f
2 changed files with 42 additions and 0 deletions
18
src/Doctrine/SetSQLMode/SetSQLModeMiddlewareWrapper.php
Normal file
18
src/Doctrine/SetSQLMode/SetSQLModeMiddlewareWrapper.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace App\Doctrine\SetSQLMode;
|
||||
|
||||
use Doctrine\DBAL\Driver;
|
||||
use Doctrine\DBAL\Driver\Middleware;
|
||||
|
||||
/**
|
||||
* This class wraps the Doctrine DBAL driver and wraps it into an Midleware driver so we can change the SQL mode
|
||||
*/
|
||||
class SetSQLModeMiddlewareWrapper implements Middleware
|
||||
{
|
||||
|
||||
public function wrap(Driver $driver): Driver
|
||||
{
|
||||
return new SetSQLModeMiddlewareDriver($driver);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue