I'm now using hibernate as main database access layer.
but I want to do one simply sql statment, which I think no need to mapping to Class, because it's too easy, and it's used temporarily.
I want to run " update lastruntime set lasttime=:lasttime".
but if I using createQuery, hibernate report error, because HQL only can be written with Class name, not table name. then I using creatSqlQuery.
and then call sqlQuery.setTimeStamp("lasttime",lasttime), hibernate still report error, this time, it says SqlQuery can only made query.
how to resolve this problem? (I don't want to use direct undlying connection)
thanks inadvance.
|