-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem with DAO class generator
PostPosted: Tue Jun 12, 2007 12:16 pm 
Newbie

Joined: Tue Jun 12, 2007 11:07 am
Posts: 9
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.