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 55
66
77use Doctrine \DBAL \Connection ;
8+ use Doctrine \DBAL \Platforms \AbstractPlatform ;
89use Doctrine \DBAL \Platforms \MySqlPlatform ;
910use Mouf \Database \MagicQuery ;
1011use TheCodingMachine \TDBM \QueryFactory \SmartEagerLoad \StorageNode ;
@@ -68,7 +69,9 @@ public function getQueryFrom(): string
6869 $ sql .= implode (', ' , $ tables );
6970 $ sql .= ' ' .$ this ->queryFrom ;
7071
72+ $ this ->magicQuery ->setOutputDialect ($ mysqlPlatform );
7173 $ sql = $ this ->magicQuery ->build ($ sql , $ this ->parameters );
74+ $ this ->magicQuery ->setOutputDialect (null );
7275 $ fromIndex = strpos ($ sql , 'FROM ' );
7376 if ($ fromIndex === false ) {
7477 throw new TDBMException ('Expected smart eager loader query to contain a "FROM" ' );
You can’t perform that action at this time.
0 commit comments