mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #910] [MERGED] [DDC-2310] [DDC-2675] Fix SQL generation on table lock hint capable platforms #8887
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/910
Author: @deeky666
Created: 1/13/2014
Status: ✅ Merged
Merged: 1/31/2014
Merged by: @beberlei
Base:
master← Head:DDC-2310📝 Commits (1)
b9ff877fix SQL generation on table lock hint capable platforms📊 Changes
5 files changed (+51 additions, -52 deletions)
View changed files
📝
lib/Doctrine/ORM/Persisters/BasicEntityPersister.php(+17 -12)📝
lib/Doctrine/ORM/Persisters/EntityPersister.php(+2 -2)📝
lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php(+10 -13)📝
lib/Doctrine/ORM/Query/SqlWalker.php(+20 -23)📝
tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php(+2 -2)📄 Description
SQL Server and SQL Anywhere use table lock hints for locking. ORM generates wrong SQL when used in conjunction with joins, in a table inheritance scenario or in a subquery. It places the table lock hints after the
JOINclauses, which is wrong. The table lock hints have to be placed after each table alias in theFROMclause.Example (current)
Example (expected)
The testsuites fail big time at the moment because of that and I suppose ORM is more or less unusable at the moment for those platforms without this patch.
I needed to adjust a lot of tests which compared compiled DQL, to make use of the platforms specific lock hint clauses.
Also I did not add new tests because there are already so many tests, where this fails without this patch that this is not necessary IMO.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.