title: Hibernate transaction duplicate problem
body: <p>I want update some of my table in database and want all of these work do in 1 transaction,
  first of all I delete some entry in branchbuildin(Table) and Insert new one after this action
  The problem occurred when I insert and entry with same buildingname and branch_fk (be cause I have this constraint on this table ( uniqueConstraints={@UniqueConstraint(columnNames={"buildingname","branch_fk"})})) but when I don't use hibernate session and use normal JDBC transaction I don't have these problem.</p>
  
  <pre><code>List&lt;Integer&gt; allBranchBuilding = branchBuildingDao.getAllBranchBuildingID(pkId, sess);
              for (Integer integer : allBranchBuilding) {
                  branchBuildingDao.delete(integer, sess); // delete kardane tamame BranchBuilding ha va tel haie aanha
              }
  
              Address myAdr = new Address();
              setAddress(myAdr, centralFlag, city, latit, longit, mainstreet, remainAdr, state);
              BranchBuildingEntity bbe = new BranchBuildingEntity();
              setBranchBuildingEntity(bbe, be, myAdr, city, centralFlag, latit, longit, mainstreet, buildingName, remainAdr, state, des);
              branchBuildingDao.save(bbe, sess);//Exception Occurred                
  </code></pre>
  
  <p>I get my session at the first of Method:</p>
  
  <pre><code>        Session sess = null;
          sess = HibernateUtil.getSession();
          Transaction tx = sess.beginTransaction();
  </code></pre>