Hi,
I have generate DAO class with Hibernate Tools 3.2 beta 9, bad java compiler (Eclipse 3.2) generate this message error in all "findById" method of all DAO*.java file:
" The method get(String, Serializable) in the type Session is not applicable for the arguments (String, int)"
Example of method generate:
public ArcFattureAttive findById(int id) {
log.debug("getting ArcFattureAttive instance with id: " + id);
try {
ArcFattureAttive instance = (ArcFattureAttive) sessionFactory
.getCurrentSession().get("geco.data.database.ArcFattureAttive", id);
if (instance == null) {
log.debug("get successful, no instance found");
} else {
log.debug("get successful, instance found");
}
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
the problem is this call:
.getCurrentSession().get("geco.data.database.ArcFattureAttive", id);
Can you help me?
Regards,
Carlo
|