File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/QueryFactory/SmartEagerLoad/Query Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 5
5
6
6
7
7
use Doctrine \DBAL \Connection ;
8
+ use Doctrine \DBAL \Platforms \AbstractPlatform ;
8
9
use Doctrine \DBAL \Platforms \MySqlPlatform ;
9
10
use Mouf \Database \MagicQuery ;
10
11
use TheCodingMachine \TDBM \QueryFactory \SmartEagerLoad \StorageNode ;
@@ -68,7 +69,9 @@ public function getQueryFrom(): string
68
69
$ sql .= implode (', ' , $ tables );
69
70
$ sql .= ' ' .$ this ->queryFrom ;
70
71
72
+ $ this ->magicQuery ->setOutputDialect ($ mysqlPlatform );
71
73
$ sql = $ this ->magicQuery ->build ($ sql , $ this ->parameters );
74
+ $ this ->magicQuery ->setOutputDialect (null );
72
75
$ fromIndex = strpos ($ sql , 'FROM ' );
73
76
if ($ fromIndex === false ) {
74
77
throw new TDBMException ('Expected smart eager loader query to contain a "FROM" ' );
You can’t perform that action at this time.
0 commit comments