这样写
from Menu a where a.parent is null and (a.permission is null or a.permission in (
select distinct b from Permission b left join b.users d where d.id = ? ,
select distinct h from Permission h left join h.depts f where f.id = ? )
)
报这个错
Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: , near line 1, column 195 [from com.luoxudong.entity.Menu a where a.parent is null and (a.permission is null or a.permission in (select distinct b from com.luoxudong.entity.Permission b left join b.users d where d.id = ? ,select distinct h from com.luoxudong.entity.Permission h left join h.depts f where f.id = ? ))]这样写
from Menu a where a.parent is null and (a.permission is null or a.permission in (
(select distinct b from Permission b left join b.users d where d.id = ? ),
(select distinct h from Permission h left join h.depts f where f.id = ?)
)
)
报这个错
Caused by: org.hibernate.HibernateException: ordinal parameter mismatch到底该怎么写
from Menu a where a.parent is null and (a.permission is null or a.permission in (
select distinct b from Permission b left join b.users d where d.id = ? ,
select distinct h from Permission h left join h.depts f where f.id = ? )
)
报这个错
Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: , near line 1, column 195 [from com.luoxudong.entity.Menu a where a.parent is null and (a.permission is null or a.permission in (select distinct b from com.luoxudong.entity.Permission b left join b.users d where d.id = ? ,select distinct h from com.luoxudong.entity.Permission h left join h.depts f where f.id = ? ))]这样写
from Menu a where a.parent is null and (a.permission is null or a.permission in (
(select distinct b from Permission b left join b.users d where d.id = ? ),
(select distinct h from Permission h left join h.depts f where f.id = ?)
)
)
报这个错
Caused by: org.hibernate.HibernateException: ordinal parameter mismatch到底该怎么写
select distinct b from Permission b left join b.users d on d.id = ? left join h.depts f on f.id = ? )
)
select distinct b from Permission b left join b.users d on d.id = ? ,
select distinct h from Permission h left join h.depts f on f.id = ? )
)
from Menu a where a.parent is null and (a.permission is null or a.permission in (
select distinct b from Permission b left join b.users d where d.id = ?) or
a.permission in (select distinct h from Permission h left join h.depts f where f.id = ? ))