title: Is the JPA @Embedded annotation mandatory?
body: <p>I have tried <strong>omitting</strong> the <code>@Embedded</code> annotation and still the fields have been embedded in the table. I cannot find anything which would say that the <code>@Embedded</code> annotation is optional.</p>
  <p><strong>Is it</strong> or <strong>is it not</strong> optional?</p>
  <p>The following code</p>
  <pre><code>@Embeddable
  public class Address {
      String city;
      String street;
  }
  
  @Entity
  public class Person {
      String name;
      @Embedded // it seems that it works even if this annotation is missing!?
      Address address;
  }
  </code></pre>
  <p>generates always the same table</p>
  <pre><code>person
      name
      city
      street
  </code></pre>
  <p>even if I do <em>not</em> specify <code>@Embedded</code>.</p>
  <hr />
  <p>My configuration:</p>
  <ul>
  <li>JBoss EAP 6.4.0</li>
  <li>hibernate-jpa-2.0-api-1.0.1.Final-redhat-3.jar</li>
  </ul>
  <hr />
  <p>The JPA specification says:</p>
  <p><a href="http://docs.oracle.com/javaee/7/api/javax/persistence/Embedded.html" rel="noreferrer">http://docs.oracle.com/javaee/7/api/javax/persistence/Embedded.html</a></p>
  <blockquote>
  <p><code>@javax.persistence.Embedded</code></p>
  <p>Specifies a persistent field or property of an entity whose value is an instance of an embeddable class. The embeddable class must be annotated as Embeddable.</p>
  </blockquote>
  <p><a href="http://docs.oracle.com/javaee/7/api/javax/persistence/Embeddable.html" rel="noreferrer">http://docs.oracle.com/javaee/7/api/javax/persistence/Embeddable.html</a></p>
  <blockquote>
  <p><code>@javax.persistence.Embeddable</code></p>
  <p>Specifies a class whose instances are stored as an intrinsic part of an owning entity and share the identity of the entity. Each of the persistent properties or fields of the embedded object is mapped to the database table for the entity.</p>
  </blockquote>