title: Update an immutable object with Lombok in Java?
body: <p>I have a domain class <code>Person</code> annotated with Lombok <code>@Value</code> thus marking it as immutable, having has 3 fields.</p>
  <p>In my service layer, I am making a call to the repository to check if the the person exists or not.</p>
  <p>If it does exist, I need to take the <code>Person</code> object from the database and update the <code>money</code> field.</p>
  <p>Since it is immutable, this cannot be done. I was reading some articles and came across that this can be done using builder pattern.</p>
  <p>I will probably need to create a <code>updatePerson()</code> in my <code>Person</code> class but not sure how to do it. Or do I need to do something else ?</p>
  <p><code>Person.java</code>:</p>
  <pre><code>@Value
  @Builder
  public class Person {
  
      private final UUID id;
      private final String job;
      private final BigDecimal money;
      
  }
  </code></pre>
  <p>I am using Java 15.</p>