之前在Symfony 2.8.7中做了类似
的事情select t.*
from t
inner join (
select x2.Name
from (
select *, cnt = count(*) over (partition by name)
from t
where name='Lisa'
) as x
inner join (
select *, cnt = count(*) over (partition by name)
from t
) as x2
on x.name <> x2.name
and x.model = x2.model
and x.cnt = x2.cnt
group by x2.name, x.cnt
having count(*) = x.cnt
) as m
on t.name = m.name
然而,这似乎不再适用于symfony 2.8.17它返回变量“testVar”不存在。 树枝引擎发生了根本性的变化吗?我怎样才能达到同样的效果?