title: Hibernate not creating ElementCollection table
body: <p>Hibernate is not generating a table for the dataAttributes Map in the MetaData class below. The code compiles but table not found at runtime.</p>
  
  <pre><code>import javax.persistence.*;
  import java.util.HashMap;
  import java.util.Map;
  
  
  
  @Entity
  public class Metadata{
  
  
      private Integer id;
  
      private Map&lt;String,String&gt; dataAttributes;
  
      public Metadata(){
          dataAttributes = new HashMap&lt;&gt;();
  
      }
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      public Integer getId() {
          return id;
      }
  
      public void setId(Integer id) {
          this.id = id;
      }
  
      public void addDataAttribute(String key, String value){
          dataAttributes.put(key,value);
      }
  
      @ElementCollection
      @MapKeyColumn(name="key")
      @Column(name="value")
      @CollectionTable(name="data_attributes", joinColumns=@JoinColumn(name="metaData_id"))
      public Map&lt;String, String&gt; getDataAttributes() {
          return dataAttributes;
      }
  
      public void setDataAttributes(Map&lt;String, String&gt; dataAttributes) {
          this.dataAttributes = dataAttributes;
      }
  
  
  }
  </code></pre>
  
  <p>All the other entities and tables are created as expected but this one is never generated and I get "Table 'nppcvis.data_attributes' doesn't exist"  when trying to save an entity that has a one-to-one relationship with MetaData with cascade=all</p>
  
  <p>I'm using the following property :</p>
  
  <pre><code>spring.jpa.hibernate.ddl-auto=create
  </code></pre>
  
  <p>Any ideas?</p>