title: Spring MVC form backing object has null attributes when not bound
body: <p>I have found many questions that are close to mine but the discussion always lead back to the same solution (DTO Approach). The problem I am facing is the following:</p>
  
  <p>I have the following backing object for a form as a list of JPA entities:</p>
  
  <pre><code>public class PlayerForm {
  private List&lt;Player&gt; players;
  
  public List&lt;Player&gt; getPlayers() {
      return players;
  }
  
  public void setPlayers(List&lt;Player&gt; players) {
      this.players = players;
  }
  
  }
  </code></pre>
  
  <p>Which is a list of the following object:</p>
  
  <pre><code>@Entity
  public class Player implements Serializable {
  
  /**
   * 
   */
  private static final long serialVersionUID = 1L;
  public enum PlayerType{
      DEV, POQA;
  }
  @Id
  private Long id;
  @Column(unique=true)
  private String name;
  private int score;
  
  @Enumerated(EnumType.STRING)
  private PlayerType playerType;
  
  
  @ManyToMany
  private List&lt;Bonus&gt; bonusItems;
  </code></pre>
  
  <p>I pass a PlayerForm to the model and bind it using the forllowing form in my view:</p>
  
  <pre><code>&lt;form:form method="POST" action="${action}"
  modelAttribute="playerForm"&gt;
  &lt;table class="${cssClass}"&gt;
      &lt;tr&gt;
          &lt;th&gt;Rank&lt;/th&gt;
          &lt;th&gt;Name&lt;/th&gt;
          &lt;th&gt;Score&lt;/th&gt;
      &lt;/tr&gt;
      &lt;c:forEach items="${playerForm.players}" var="player" varStatus="status"&gt;
          &lt;tr&gt;
              &lt;td class="center"&gt;${status.count}&lt;/td&gt;
              &lt;td&gt;${player.name}&lt;/td&gt;
              &lt;td&gt;&lt;input name="players[${status.index}].id" type="hidden"
                  value="${player.id}" /&gt;&lt;input name="players[${status.index}].name" type="hidden"
                  value="${player.name}" /&gt;&lt;input name="players[${status.index}].score" type="number"
                  value="${player.score}" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/c:forEach&gt;
  &lt;/table&gt;
  &lt;input style="width: 25%;" onclick="clearPreviousMessages();"
      type="submit" value="Submit Changes" /&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p>After submitting the form, attributes that are not mapped to a form input are nulled. I know i can use a DTO abstraction of my entity and this will solve the problem. However, is there a way for spring mvc to only bind the values of my inputs to attributes while maintaining the intial values of the other attributes passed to the model even though they are not bound to any input?</p>