title: Updating a record with primary key as UUID not working in Spring Boot
body: <p>I am using Spring Boot v1.5.3.RELEASE and MYSQL as Backend for creating Restful service.</p>
  
  <p>I have a <code>TransactionTbl</code> table and wanted its primary key to be a uuid type as I think there will be lots of records in that table.</p>
  
  <p>Primary key definition in the Entity:</p>
  
  <pre><code>@Id
  @GenericGenerator(name = "uuid",strategy = "org.hibernate.id.UUIDGenerator",
      parameters={ @Parameter (name = "uuid_gen_strategy_class",
      value = "org.hibernate.id.uuid.CustomVersionOneStrategy") })
  @GeneratedValue(generator =  "uuid")
  @Column(name="txn_id")
  private UUID txnId;
  </code></pre>
  
  <p>Code to Update :</p>
  
  <pre><code> txnObj = txnService.findOne(txnObj.getTxnId());
   txnObj.setAmt(someUpdatedAmountValue);
   txnService.save(txnObj);
  </code></pre>
  
  <p>When the above code block runs it throws a  <code>org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1</code> error </p>
  
  <p>When I tried switching the primary key from <code>UUID</code> to a <code>Long</code> with <code>@Id @GeneratedValue(strategy = GenerationType.AUTO)</code> it is working as expected.</p>
  
  <p>Am I defining the UUID in a wrong way or updates like this will not work if we use UUID generation?</p>