1.Student student = new Student(); ==>Transient
student.setStudentNo("1");
No record in the database n not associated with the session.
2.session.save();tx.commit(); ==> Persistance
Record in the database,associated with the session.
3.session.close(); ==> Detached
Record in the database, not associated with the session.
student.setStudentNo("1");
No record in the database n not associated with the session.
2.session.save();tx.commit(); ==> Persistance
Record in the database,associated with the session.
3.session.close(); ==> Detached
Record in the database, not associated with the session.