Doctrine 2 - How to use discriminator column in where clause

后端 未结 5 1747
春和景丽
春和景丽 2020-12-14 05:45

I was used discriminator column in where clause like this:

//f = root entity
$qb = $this->createQueryBuilder(\'f\');
$qb->add(\'where\', \'f.format = \         


        
5条回答
  •  情歌与酒
    2020-12-14 06:25

    for PHP 5.50 and above:

    $this->createQueryBuilder('f')
            ->andWhere('f INSTANCE OF '.Image::class)
    

提交回复
热议问题