Hello fellows.
I'm writing this post because I can't find out a solution to a problem I have recently faced up to.
I had to update the spring.jar from version 1.1 to 2.0 because the application have to recognize <import> tags.
Because of this change, I think I have to migrate from hibernate2 to hibernate3, so I changed the paths in the *DAOImpl.java from "org.springframework.orm.hibernate" to "org.springframework.orm.hibernate3" and from "net.sf.hibernate" to "org.hibernate".
The project is an Struts+Spring+Hibernate(HQL) project.
But now, once I have done all of these things, I've met up with another problem.
Things like this
Code:
public void deleteModel(Integer modelCode)
{
getHibernateTemplate().delete(
"from Model model where model.code = ?",
modelCode,
Hibernate.INTEGER);
}
worked perfectly on hibernate2, but with the change to hibernate3, there's no more that "delete" prototype.
All I have now is:
Code:
void delete(Object entity)
and
Code:
void delete(Object entity, Lockmode lockmode)
I don't even know how to use the "lockmode", and just wanted to know, how can I compress all the 3 parameters above to match the "entity" parameter of the new delete function.
Thanks a lot for any help.