Jira issue originally created by user @beberlei:
The WITH Keyowrd is appended to the whole FROM .. JOIN .. block instead of behind the FROM block.
Comment created by @zeroedin-bill:
Is there a better workaround for this issue than this?
diff --git a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
index c9af278..2f192ea 100644
@@ -1020,7 </ins>1020,7 @@ class SQLServerPlatform extends AbstractPlatform
$lockClause = '';
- return $fromClause . $lockClause;
+ return $fromClause;// . $lockClause;
I've just been keeping my own fork of DBAL to work around this bug, but it would be nice if it was fixed. Bad thing is that I see no convenient or non-obfuscated way of doing it, so I don't feel comfortable submitting a patch.
This is pretty severe, as it completely breaks select queries against entities with inheritance.
I think this is fixed in 2.4...
Comment created by @ocramius:
Already solved in 2.4 indeed.
Issue was closed with resolution "Fixed"