Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix foreign key columns order in Oracle #474

Merged
merged 1 commit into from

3 participants

@deeky666
Collaborator

The order of columns in foreign key constraints is not synchronized by the Oracle platform.

Failing test:

Doctrine\Tests\DBAL\Functional\Schema\OracleSchemaManagerTest::testListForeignKeysComposite
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
-    0 => 'id'
-    1 => 'foreign_key_test'
+    0 => 'foreign_key_test'
+    1 => 'id'
 )

/home/deeky/dev/doctrine/dbal/tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php:672
@doctrinebot
Collaborator

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DBAL-741

We use Jira to track the state of pull requests and the versions they got
included in.

@beberlei beberlei merged commit 9bc6cd0 into doctrine:master

1 check passed

Details default The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 28, 2013
  1. @deeky666
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/Doctrine/DBAL/Platforms/OraclePlatform.php
View
3  lib/Doctrine/DBAL/Platforms/OraclePlatform.php
@@ -558,7 +558,8 @@ public function getListTableForeignKeysSQL($table)
AND cols.position = r_cols.position
WHERE alc.constraint_name = cols.constraint_name
AND alc.constraint_type = 'R'
- AND alc.table_name = '".$table."'";
+ AND alc.table_name = '".$table."'
+ ORDER BY alc.constraint_name ASC, cols.position ASC";
}
/**
Something went wrong with that request. Please try again.