title: PessimisticLockException when saving data in loop
body: <p>I am getting pesimistlockexception when trying to persist multiple object of same time through JPA.
  Here is my code for reference</p>
  
  <pre><code>@Override
  @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
  public Boolean changeDplListMappingByCustomWatchList(List&lt;Integer&gt; dplIds, Integer customWatchListId,
      ServiceRequestor customServiceRequestor) {
  
              for(Integer dplId : dplIds) {
                  if(dplId != null) {
                      CustomWatchListDplMapping customWatchListDplMapping = new CustomWatchListDplMapping();
                      customWatchListDplMapping.setDplId(dplId);
                      customWatchListDplMapping.setWatchListId(customWatchListId);
  
                      this.create(customWatchListDplMapping);
                  }
              }
      }
      catch(Exception e) {
          LOG.error("Exception occured while changing dpl mapping by custom watchList id", e);
      }
  
      return true;
  }
  
  public void create(Model entity) {
      manager.persist(entity);
      manager.joinTransaction();
  }
  </code></pre>
  
  <p>After first entity when it iterate through second one it throws an exception. If it has only one entity to save then it works well, but for more than one entity model it throws this exception.</p>