I want to save records in database with this method.
Code:
public void save(LookupTablePojo obj) {
try {
System.out.println("---ID before: "+obj.getId()+" ----- ");
getHibernateTemplate().save(obj);
System.out.println("---ID after: "+obj.getId()+" ----- ");
} catch (RuntimeException re) {
throw re;
}
}
When I execute this method through application it gives me this output and the hibernate sql is also printed as follows
Code:
---ID before: null -----
Hibernate: insert into alfresco.lookup_table (LOOKUP_KEY, LOOKUP_VALUE, ID) valu
es (?, ?, ?)
---ID after: 5 -----
It means that it is saving the records properly, but the records are not actually getting saved in database. what could be the problem.
I also tried being and commit transaction but that too does not work...
Plz suggest some fix
thanks