title: Hibernate Insert Query in Java
body: <p>Can anyone tell me how to perform an insert query with Hibernate and back end postgresql
  I am using the following implementation but not working</p>
  
  <pre><code>Session session = gileadHibernateUtil.getSessionFactory().openSession();
  session.beginTransaction();
  
  User A= new User();
  A.setId(67);
  A.setFirstName("Noor");
  A.setLastName("asd");
  A.setMobileNumber("2435");
  A.setTelephoneNumber("dfg");
  
  session.save(A);
  session.getTransaction().commit();
  </code></pre>