Hi,
My generated DAO objects are returning this when called;
"org.hibernate.HibernateException: get is not valid without active transaction"
And I can see that the generated DAO objects do not wrap the call in a transaction, eg;
Applications instance = (Applications) sessionFactory.getCurrentSession()
.get("versioning.Applications", id);
I understood that the recommended practice was to handle the transaction in the code rather than auto-commit, but it seems the generated DAO code is expecting to have auto_commit turned on?
Am I missing something here?
Thanks,
T.
|