title: How to deal with a bean containing @Id @GeneratedVaule in Vaadin?
body: <p>I'm trying to make a form that will send data to the database in Vaadin.</p>
  
  <p>Bean Person.java is a typical JavaBean:</p>
  
  <pre><code>import java.io.Serializable;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.Id;
  
  @Entity
  public class Person implements Serializable {
  
  @Id
  @GeneratedValue
  private Long id;
  private String firstName;
  private String lastName;
  
  public Person(Long id, String firstName, String lastName) {
      this.id = id;
      this.firstName = firstName;
      this.lastName = lastName;
  }
  
  public Person() {
  }
  
  -- getters and setters --
  </code></pre>
  
  <p>The Vaadin FieldGroup looks like this:</p>
  
  <pre><code>FieldGroup fieldGroup = new BeanFieldGroup&lt;Person&gt;(Person.class);
  
  // from the tutorial: "We need an item data source before we create the fields to be able to
  // find the properties, otherwise we have to specify them by hand"
  fieldGroup.setItemDataSource(new BeanItem&lt;Person&gt;(new Person(1L,
       "John", "Doe")));
  
  for (Object propertyId : fieldGroup.getBoundPropertyIds()) {
      layout.addComponent(fieldGroup.buildAndBind(propertyId));
  }
  </code></pre>
  
  <p>There is nothing on the page. Nothing is generated, no form fields. Am I missing something? I'm completely new to Vaadin to be honest. On the second hand, I'm wondering how to deal with the ID field. It is generated automatically, so the user shall have NO impact on this vaule... I'm lost.</p>