Hibernate First Steps
For adding a new object (to database) the code below suffice (you still need to define xml files / JPA annotation still for hibernate configuration): Configuration conf = new Configuration().configure(file);SessionFactory sessionFactory = conf.buildSessionFactory();session =sessionFactory.openSession();//Create new instance of Contact and set values in it by reading them from form object Transaction tx;tx = session.beginTransaction(); System.out.println(“Inserting Record”);contact… Continue reading Hibernate First Steps