1
0
mirror of synced 2025-01-18 14:31:40 +03:00

Fixes required for Microsoft SQL tests

This commit is contained in:
Juozas Kaziukenas 2010-11-17 13:18:18 -08:00
parent b6da2e0e42
commit 831b40e093
4 changed files with 3 additions and 4 deletions

View File

@ -22,6 +22,7 @@ namespace Doctrine\Tests\Models\DirectoryTree;
/**
* @Entity
* @Table(name="File_model")
*/
class File extends AbstractContentItem
{

View File

@ -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;

View File

@ -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 = ?'
);
}
}

View File

@ -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');