1.

How Does Hibernate Code Looks Like?

Answer»

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. 

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. 



Discussion

No Comment Found