org.hibernate.hql.internal.ast.QuerySyntaxException:unexpected token:null 1, column 290 [select COUNT (*) from Cn.com.taiji.sample.entity.User T where 1=1 and (T.name like:username or t.namepy like:username or T.loginname like:us Ername and T.status =:status and NOT EXISTS (select B.user from Cn.com.sample.entity.UserRole b where B.role.id =:roleid an D b.user.id = t.id)]
This is my report of the error, the cause of the error is a syntax format errors, the entire HQL statement is here, combined with online search solutions, summarized as follows:
1, the extra space;
2, the string quotation marks should be single quotation marks;
3, =: should be together, there is no space, ' like: ' Intermediary need to have space, in fact, here is not so rigorous, just in case;
4, brackets, my problem is that the left parenthesis more than the right parenthesis one;
There may be other reasons, hope to help you!
Unexpected token:null near line 1, column 290