title: Spring JPA - SQL Server Conversion from BLOB to varbinary(max) error
body: <p>I'm trying to update my data in SQL server through spring JPA but it throws an error saying:-- </p>
  
  <p><strong>WARN - SQL Error: 8152, SQLState: 22001</strong></p>
  
  <p><strong>ERROR - String or binary data would be truncated.</strong> </p>
  
  <p>Which happens because of a Pic field in the database having datatype varbinary (max) for which I'm using BLOB as its variable data type in the DTO file.</p>
  
  <p>I'm using the save method from the crud repository to update records in the DB, which fails due to the above error. What should I do to fix it?</p>
  
  <p>Employee DTO pic content--</p>
  
  <pre><code>    @Lob
      @ApiModelProperty(notes = "")
      public Blob Profile_Pic;
  
      public Blob getProfile_Pic() {
          return Profile_Pic;
      }
      public void setProfile_Pic(Blob profile_Pic) {
          Profile_Pic = profile_Pic;
      }
  
  </code></pre>
  
  <p>Employee Update code---</p>
  
  <pre><code>portalEmployeeRepo.save(employee);
  
  </code></pre>