protected Person getOne(int id){
Session session = HibernateSessionFactory.getSession();
Person person = new Person();
try{
session.load(person, id);
}catch(Exception e){
e.printStackTrace();
}finally{
session.close();
}
return person;
}
protected Person getOne(int id){
Session session = HibernateSessionFactory.getSession();
Person person = new Person();
try{
session.load(person, id);
}catch(Exception e){
e.printStackTrace();
}finally{
session.close();
}
return person;
}
转载于:https://my.oschina.net/JiangTun/blog/472679