title: Hibernate persist() method
body: <p>Is the below statement a valid one?</p>
  
  <p><code>persist() also guarantees that it will not execute an INSERT statement if it is called outside of transaction boundaries</code></p>
  
  <p>When I try the below code using persist; then the row is getting inserted without any transaction (It is commented out).</p>
  
  <pre><code>SessionFactory sessionFactory = new Configuration().configure("student.cfg.xml").buildSessionFactory();
      Session session = sessionFactory.openSession();
  
      //Transaction tran = session.beginTransaction();
  
      /*
       * Persist is working without transaction boundaries ===&gt; why?
       */
  
      Student student = new Student();
      student.setFirstName("xxx");
      student.setLastName("yyy");
      student.setCity("zzz");
      student.setState("ppp");
      student.setCountry("@@@");
      student.setId("123456");
              session.persist(student);
              //tran.commit();
              session.flush();
      session.close();
  </code></pre>