String hql = "DELETE FROM Users WHERE id=:id"; (DELETE FROM中间是中文的空格)。
hiberate报错:
line 1:1: unexpected token: DELETE FROM
java.lang.IllegalArgumentException: node to traverse cannot be null!
放到数据库中执行sql:
sql报错:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ' '.
建议:hql语句中,不要出现中文的空格(但这个很难查出来,所以你可以重新写一下hql语句)
hiberate报错:
line 1:1: unexpected token: DELETE FROM
java.lang.IllegalArgumentException: node to traverse cannot be null!
放到数据库中执行sql:
sql报错:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ' '.
建议:hql语句中,不要出现中文的空格(但这个很难查出来,所以你可以重新写一下hql语句)