Skip to content

Loading…

DDC-1624: Locking CTI doesnt work on SQL Server #2265

Closed
doctrinebot opened this Issue · 5 comments

2 participants

@doctrinebot

Jira issue originally created by user @beberlei:

The WITH Keyowrd is appended to the whole FROM .. JOIN .. block instead of behind the FROM block.

@doctrinebot

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
--- a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
<ins></ins><ins> b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
@@ -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.

@doctrinebot

Comment created by @zeroedin-bill:

I think this is fixed in 2.4...

@doctrinebot

Comment created by @ocramius:

Already solved in 2.4 indeed.

@doctrinebot

Issue was closed with resolution "Fixed"

@Ocramius Ocramius was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.5 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.