我的桌子上有两个特别的词,不知道但后来发现它们是保留字。试图用单引号和双引号包装它们,但没有工作并得到这个错误:
java.lang.ClassCastException: org.hibernate.hql.internal.ast.tree.SqlNode无法强制转换为 org.hibernate.hql.internal.ast.tree.FromReferenceNode
任何人都知道如何解决它?
Query query = session.createQuery("Update Routes set airline = :airline, "
+ "code = :code, from = :from, to = :to, airplaneid = :airplaneid, "
+ "price = :price, booked = :booked, activestatus = :activestatus"
+ " where code = :code ");