gpt4 book ai didi

php - Doctrine 2 - 如何在 where 子句中使用鉴别器列

转载 作者:IT王子 更新时间:2023-10-29 01:03:56 25 4
gpt4 key购买 nike

我在 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 子句中使用鉴别器列?

谢谢。

最佳答案

我认为你应该使用 INSTANCE OF

关于php - Doctrine 2 - 如何在 where 子句中使用鉴别器列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5988636/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com