0
<?php
namespace Proj\Bundle\MyBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* ClassTop
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="Proj\Bundle\MyBundle\Repository\ClassTopRepository")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="aVal", type="string")
* @ORM\DiscriminatorMap({ "ValOne" = "ClassSubOne", "ValTwo" = "ClassSubTwo", "ValThree" = "ClassSubThree" })
*
*/
class ClassTop
{
.....
}
class ClassSubOne extends ClassTop
{
....
}
class ClassSubTwo extends ClassTop
{
....
}
class ClassSubThree extends ClassTop
{
....
}
我的問題是,當我打電話查找()(或findOneBy,的findAll等)的方法,我有一個Oracle錯誤。
$entityManager->getRepository('ProjMyBundle:ClassSubOne')->findAll()
在查詢我
SELECT field, field2 FROM CLASSTOP WHERE aVAL IN()
鑑別值「瓦隆」不映射和學說中沒有通過。
任何幫助將不勝感激。
Thx