Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1624

Locking CTI doesnt work on SQL Server

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2
    • Fix Version/s: 2.5
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

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

        Issue Links

          Activity

          Hide
          William Schaller added a comment -

          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
          +++ b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
          @@ -1020,7 +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.

          Show
          William Schaller added a comment - 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 +++ b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php @@ -1020,7 +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.

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Benjamin Eberlei
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: