Hello everyone. Sorry for bothering with this question that, I'm sure, has a simple answer that I really cannot find out. I read articles over and over and still cannot find the answer.
So I'm using Hibernate annotations and dao stuff. Everything works perfectly: I can define beans with table information, declare relationships and collections etc.
I created some classes to manage access to data, like:
Code:
public class UserManager extends HibernateDaoSupport implements IUserManager{
//declarations
public User getUser(String id){
return (User) getHibernateTemplate().load(User.class,id);
}
}
The objects are created using spring so I can inject session factory etc.
Here's my problem. The user returns correctly, but when I try to 1) access a lazy collection in it, or when I edit it and try to 2) update the db, it says that the 1) session is closed and the 2) object is detatched and cannot be updated
I'm sure I'm missing some obvious configuration aspect, or more probably, I'm missing the theory I mostly skipped because of urgency...
Any help will be extremely appreciated.
Thanks in advance