Issue in Adding data into database using hibernate
- by sarah
Hi ,
I am getting the following exception "org.hibernate.HibernateException: The database returned no natively generated identity value "while adding data into database i am using the following code.Please let me know what is wrong
Sesion session=HibernateUtil.getSession();
Transaction tx = session.beginTransaction();
session.save(user);
logger.info("Successfully data insert in database");
tx.commit();
isSaved=true;
Thankx