3 namespace Doctrine\Tests\ORM\Functional\Ticket;
5 use Doctrine\Common\Collections\ArrayCollection;
6 use Doctrine\Tests\Models\CMS\CmsEmployee;
8 require_once __DIR__ . '/../../../TestInit.php';
13 class DDC1225Test extends \Doctrine\Tests\OrmFunctionalTestCase
15 public function setUp()
19 $this->_schemaTool->createSchema(array(
20 $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC1225_TestEntity1'),
21 $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC1225_TestEntity2'),
23 } catch(\PDOException $e) {
28 public function testIssue()
30 $qb = $this->_em->createQueryBuilder();
31 $qb->from('Doctrine\Tests\ORM\Functional\Ticket\DDC1225_TestEntity1', 'te1')
33 ->where('te1.testEntity2 = ?1')
37 strtolower('SELECT t0_.test_entity2_id AS test_entity2_id0 FROM te1 t0_ WHERE t0_.test_entity2_id = ?'),
38 strtolower($qb->getQuery()->getSQL())
47 class DDC1225_TestEntity1
51 * @ManyToOne(targetEntity="Doctrine\Tests\ORM\Functional\Ticket\DDC1225_TestEntity2")
52 * @JoinColumn(name="test_entity2_id", referencedColumnName="id", nullable=false)
57 * @param DDC1225_TestEntity2 $testEntity2
59 public function setTestEntity2(DDC1225_TestEntity2 $testEntity2)
61 $this->testEntity2 = $testEntity2;
65 * @return DDC1225_TestEntity2
67 public function getTestEntity2()
69 return $this->testEntity2;
77 class DDC1225_TestEntity2
81 * @GeneratedValue(strategy="AUTO")
82 * @Column(type="integer")