title: Models not being saved in Play Framework
body: <p>Assume a model named <code>User</code>:</p>
  
  <pre><code>@Entity
  public class User extends Model {
      @Id
      @Constraints.Min(10)
      public Long id;
  
      @Constraints.Required
      public String username;
  
      @Constraints.Required
      public String password;
  
      public static Finder&lt;Long, User&gt; find = new Finder&lt;Long, User&gt;(
          Long.class, User.class
      );
  }
  </code></pre>
  
  <p>When I attempt to update an instance of <code>User</code> in my controller:</p>
  
  <pre><code>    User user = User.find.where().eq("username", username).findUnique();
  
      if(user != null) {
          user.username = "some_new_username";
          user.save();
      }
  </code></pre>
  
  <p>no changes seem to be committed. I read somewhere that when you alter a model instance by its property, it does not get dirty and therefore no changes take place. Hence you should use a setter instead. In the documentation of Play Framework it is said that those setters (and getters) are generated automatically, but using <code>user.setUsername(username)</code> gives me a compilation error:</p>
  
  <pre><code>cannot find symbol [symbol: method setUsername(java.lang.String)] [location: class models.User]
  </code></pre>
  
  <p>Am I missing something?</p>