title: setting entity data adds to existing ones instead of replacing all existing values on Patch request
body: <p>I have this code in my ObjectServiceService. Every time I send a patch request, it adds to existing items and then it will have duplicates.</p>
  
  <p>For example, at first I have items A, B, C. I send a patch request where I have removed ObjectServiceJob "C", so the request would contain A and B. After the request goes through, new items are A, B, C, A, B. </p>
  
  <p>Also, the same happens when adding entities. If I have A, B and then add C, the list becomes A, B, A, B, C.</p>
  
  <p>I don't really understand why it's doing this, it's the only place in my application where this isn't working the way I want it to.</p>
  
  <pre><code>public ObjectService modifyObjectService(PatchObjectServiceRequest request, Long id){
          ObjectService objectService = getObjectServiceById(id);
          objectService.createSnapshot();
          ObjectService editedObjectService = this.setObjectServiceData(request, getObjectServiceById(id));
          if (objectService.hasSnapshot()) {
              Map&lt;String, SnapshotEntity.Change&gt; changes = objectService.detectChanges();
              logService.saveLogTypeUpdate(editedObjectService, changes);
          }
          return editedObjectService;
      }
  
  public ObjectService setObjectServiceData(PatchObjectServiceRequest request, ObjectService objectService) {
  
          if (request.getObjectServiceJobs() != null) {
              objectServiceRepository.save(objectService);
              List&lt;ObjectServiceJob&gt; objectServiceJobs = new ArrayList&lt;&gt;();
              request.getObjectServiceJobs().forEach(serviceJob -&gt; {
                  ObjectServiceJob objectServiceJob = new ObjectServiceJob();
                  objectServiceJob.setObjectService(objectService);
                  objectServiceJob.setJob(serviceJob.getJob());
                  objectServiceJob.setWorkDetail(serviceJob.getWorkDetail());
                  objectServiceJobRepository.save(objectServiceJob);
                  objectServiceJobs.add(objectServiceJob);
              });
              objectService.setObjectServiceJobs(objectServiceJobs);
          }
          return objectServiceRepository.save(objectService);
      }
  </code></pre>
  
  <p>This is how ObjectService entity contains ObjectServiceJobs:</p>
  
  <pre><code>@OneToMany(mappedBy = "objectService")
      @SnapshotIgnored
      private List&lt;ObjectServiceJob&gt; objectServiceJobs;
  </code></pre>
  
  <p>And this is the ObjectServiceJob entity:</p>
  
  <pre><code>@Entity
  @Data
  @NoArgsConstructor
  @Table(name = "object_service_job")
  public class ObjectServiceJob extends SnapshotEntity implements SnapshotCompatible {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(unique = true, nullable = false, columnDefinition = "serial")
      private Long id;
  
      @ManyToOne
      @JoinColumn(name = "object_service_id", nullable = false)
      @JsonIgnore
      private ObjectService objectService;
  
      @ManyToOne
      @JoinColumn(name = "job_id", nullable = false)
      private Job job;
  
      @ManyToOne
      @JoinColumn(name = "work_detail_id")
      private WorkDetail workDetail;
  
      @Override
      public String getSnapshotString() {
          return job.getName();
      }
  }
  </code></pre>