$q=$this->_em->createQuery("select b from ".__NAMESPACE__."\\DDC448SubTable b where b.connectedClassId = ?1");
$this->assertEquals('SELECT d0_.id AS id0, d0_.discr AS discr1, d0_.connectedClassId AS connectedClassId2 FROM SubTable s1_ INNER JOIN DDC448MainTable d0_ ON s1_.id = d0_.id WHERE d0_.connectedClassId = ?',$q->getSQL());
//$q = $this->_em->createQuery("select u from ".__NAMESPACE__."\\DDC513Item u left join u.price p");
//$this->assertEquals('SELECT d0_.id AS id0, d0_.discr AS discr1, d0_.price AS price2 FROM DDC513Item d0_ LEFT JOIN DDC513OfferItem d1_ ON d0_.id = d1_.id LEFT JOIN DDC513Price d2_ ON d0_.price = d2_.id', $q->getSQL());
/* THIS QUERY CAUSE EXCEPTION */
$q=$this->_em->createQuery("select u from ".__NAMESPACE__."\\DDC513OfferItem u left join u.price p");
$this->assertEquals('SELECT d0_.id AS id0, d0_.discr AS discr1, d0_.price AS price2 FROM DDC513OfferItem d1_ INNER JOIN DDC513Item d0_ ON d1_.id = d0_.id LEFT JOIN DDC513Price d2_ ON d0_.price = d2_.id',$q->getSQL());