title: Batch update returned unexpected row count from update [0];
body: <p>I use this entity in order to record into database.</p>
  
  <pre><code>@Entity
  @Table(name = "SYSTEM_USERS")
  public class SystemUsersModel implements Serializable
  {
      private static final long serialVersionUID = 8432414340180447723L;
  
      @Id
      @GeneratedValue
      private Integer id;
  
      @Column
      private String username;
  
      @Column
      private String email;
  
      @Column
      @Type(type = "date")
      @Temporal(TemporalType.DATE)
      private Date lastlogin;
  
      @Column
      private String password;
  
      @Column
      private String salt;
  
      @Column
      @Type(type = "date")
      @Temporal(TemporalType.DATE)
      private Date added;
  </code></pre>
  
  <p>Delete query:</p>
  
  <pre><code>SessionFactory factory = HibernateUtils.getSessionFactory();
          Session session = factory.getCurrentSession();
  
          try
          {
              session.getTransaction().begin();
  
              SystemUsersModel obj = new SystemUsersModel();
              obj.setId(userlist.getId());
  
              session.delete(obj);
  
              session.getTransaction().commit();
  
              blacklists.remove(selectedBlackListEntry);
              selectedBlackListEntry = null;
          }
          catch (Exception e)
          {
              e.printStackTrace();
              session.getTransaction().rollback();
          }
  </code></pre>
  
  <p>Then I run the code I get this error:</p>
  
  <pre><code>Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
  </code></pre>
  
  <p>I had inserted several rows using script before I start the application.
  How I can solve this issue?</p>