我在 where 子句中使用了鉴别器列,如下所示:
//f = root entity
$qb = $this->createQueryBuilder('f');
$qb->add('where', 'f.format = \'image\' OR f.format = \'text\'');
我有一个错误:“消息:[Semantical Error] line 0, col 73 near 'format = 'image'': Error: Class Entities\File\AbstractFile has no field or association named format”
如何在 where 子句中使用鉴别器列?
谢谢。