Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.2
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Name and version of the database you are using: MySql
I am very new to hibernate!
How do I create a record in the DB and return it at the same time using the id. For example, if a I have Student with st_id I am trying to do this:
Code:
session.beginTransaction();
session.save(student);
session.getTransaction().commit();
return student;
The stundent object that is returned doesn't containt the auto increment id field in the DB.