I want to update the database from an input form. I am using hibernate template in spring to deal with database transactions.
Following i the code where i am encountering an error.
I want to update the place for a particular name. The above hibernate query is giving this error.Code:String firstName=request.getParameter("first_name"); String place=request.getParameter("place"); hibernateTemplate.update("update Details set place =?"+place+" WHERE first_name=?"+firstName+"");
I am able to run insert and find queries successfully, so i am sure about the configuration in the XML files.Code:org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity: java.lang.String; nested exception is org.hibernate.MappingException: Unknown entity: java.lang.String
Can anyone suggest me right way of writing the above query.
Thanks


Reply With Quote