1
0
mirror of synced 2024-12-05 03:06:05 +03:00

Re-added coverage for DDC-369 and DDC-954.

This commit is contained in:
Guilherme Blanco 2012-05-23 01:07:29 -04:00
parent f54f8f8a95
commit b32bb26a84
2 changed files with 14 additions and 6 deletions

View File

@ -53,21 +53,29 @@ class CompanyPerson
* @GeneratedValue * @GeneratedValue
*/ */
private $id; private $id;
/** /**
* @Column * @Column
*/ */
private $name; private $name;
/** /**
* @OneToOne(targetEntity="CompanyPerson") * @OneToOne(targetEntity="CompanyPerson")
* @JoinColumn(name="spouse_id", referencedColumnName="id") * @JoinColumn(name="spouse_id", referencedColumnName="id", onDelete="CASCADE")
*/ */
private $spouse; private $spouse;
/** /**
* @ManyToMany(targetEntity="CompanyPerson") * @ManyToMany(targetEntity="CompanyPerson")
* @JoinTable(name="company_persons_friends", * @JoinTable(
joinColumns={@JoinColumn(name="person_id", referencedColumnName="id")}, * name="company_persons_friends",
inverseJoinColumns={@JoinColumn(name="friend_id", referencedColumnName="id")}) * joinColumns={
* @JoinColumn(name="person_id", referencedColumnName="id", onDelete="CASCADE")
* },
* inverseJoinColumns={
* @JoinColumn(name="friend_id", referencedColumnName="id", onDelete="CASCADE")
* }
* )
*/ */
private $friends; private $friends;

View File

@ -128,7 +128,7 @@ class AdvancedDqlQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase
'SELECT count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p WHERE p.salary = 1')->getResult()) > 0); 'SELECT count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p WHERE p.salary = 1')->getResult()) > 0);
} }
/*public function testDeleteAs() public function testDeleteAs()
{ {
$dql = 'DELETE Doctrine\Tests\Models\Company\CompanyEmployee AS p'; $dql = 'DELETE Doctrine\Tests\Models\Company\CompanyEmployee AS p';
$this->_em->createQuery($dql)->getResult(); $this->_em->createQuery($dql)->getResult();
@ -137,7 +137,7 @@ class AdvancedDqlQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase
$result = $this->_em->createQuery($dql)->getSingleScalarResult(); $result = $this->_em->createQuery($dql)->getSingleScalarResult();
$this->assertEquals(0, $result); $this->assertEquals(0, $result);
}*/ }
public function generateFixture() public function generateFixture()
{ {