IT Placement Papers JAVA Hibernate
This category contains Hibernate Interview Questions and Answers |
How does hibernate code looks like?
|
|
|
|
|
Session session = getSessionFactory().openSession();
Transaction tx = session.beginTransaction();
MyPersistanceClass mpc = new MyPersistanceClass ("Sample App");
session.save(mpc);
tx.commit();
session.close();
The Session and Transaction are the interfaces provided by hibernate. There are many other interfaces besides this.
Only registered users can write comments. Please login or register.
|