Doctrine 条令2.0 DQL concat参数问题

Doctrine 条令2.0 DQL concat参数问题,doctrine,dql,Doctrine,Dql,这是我的密码: $query = $this->em->createQuery("select t.name,(select count(v) from Entity\Vacancy v where v.tags like '%t.name%') as weight from Entity\Tag t"); 问题是: 在带引号的字符串中,t.name不替换为value 在sql格式中,一切正常: select tag.*,(select count(*) from vacancy

这是我的密码:

$query = $this->em->createQuery("select t.name,(select count(v) from Entity\Vacancy v where v.tags like '%t.name%') as weight from Entity\Tag t");
问题是:

在带引号的字符串中,t.name不替换为value

在sql格式中,一切正常:

select tag.*,(select count(*) from vacancy where vacancy.tags like CONCAT('%',tag.name,'%')) as weight from tag
我尝试使用CONCAT(dql参数),但解析器会抛出错误,之后LIKE解析器只等待字符串

有什么办法吗?