From 831b40e0938f77602934ed869f98644ee47faef1 Mon Sep 17 00:00:00 2001 From: Juozas Kaziukenas Date: Wed, 17 Nov 2010 13:18:18 -0800 Subject: [PATCH] Fixes required for Microsoft SQL tests --- tests/Doctrine/Tests/Models/DirectoryTree/File.php | 1 + tests/Doctrine/Tests/ORM/Functional/Ticket/DDC809Test.php | 2 -- tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php | 2 +- tests/Doctrine/Tests/OrmFunctionalTestCase.php | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/Doctrine/Tests/Models/DirectoryTree/File.php b/tests/Doctrine/Tests/Models/DirectoryTree/File.php index 353177c81..57f505c33 100644 --- a/tests/Doctrine/Tests/Models/DirectoryTree/File.php +++ b/tests/Doctrine/Tests/Models/DirectoryTree/File.php @@ -22,6 +22,7 @@ namespace Doctrine\Tests\Models\DirectoryTree; /** * @Entity + * @Table(name="File_model") */ class File extends AbstractContentItem { diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC809Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC809Test.php index 8ab65d8c6..3b0734998 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC809Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC809Test.php @@ -66,7 +66,6 @@ class DDC809Variant /** * @Column(name="variant_id", type="integer") * @Id - * @GeneratedValue(strategy="AUTO") */ protected $variantId; @@ -98,7 +97,6 @@ class DDC809SpecificationValue /** * @Column(name="specification_value_id", type="integer") * @Id - * @GeneratedValue(strategy="AUTO") */ protected $specificationValueId; diff --git a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php index 642637116..b7b33542b 100644 --- a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php @@ -840,7 +840,7 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase { $this->assertSqlGeneration( 'SELECT f FROM Doctrine\Tests\Models\DirectoryTree\File f JOIN f.parentDirectory d WHERE f.id = ?1', - 'SELECT f0_.id AS id0, f0_.extension AS extension1, f0_.name AS name2 FROM File f0_ INNER JOIN Directory d1_ ON f0_.parentDirectory_id = d1_.id WHERE f0_.id = ?' + 'SELECT f0_.id AS id0, f0_.extension AS extension1, f0_.name AS name2 FROM File_model f0_ INNER JOIN Directory d1_ ON f0_.parentDirectory_id = d1_.id WHERE f0_.id = ?' ); } } diff --git a/tests/Doctrine/Tests/OrmFunctionalTestCase.php b/tests/Doctrine/Tests/OrmFunctionalTestCase.php index a115abc46..53706ed47 100644 --- a/tests/Doctrine/Tests/OrmFunctionalTestCase.php +++ b/tests/Doctrine/Tests/OrmFunctionalTestCase.php @@ -168,7 +168,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase $conn->executeUpdate('DELETE FROM navigation_countries'); } if (isset($this->_usedModelSets['directorytree'])) { - $conn->executeUpdate('DELETE FROM File'); + $conn->executeUpdate('DELETE FROM File_model'); // MySQL doesnt know deferred deletions therefore only executing the second query gives errors. $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL'); $conn->executeUpdate('DELETE FROM Directory');