title: jpa entity not update relationship actions in database
body: <p>I have component object mapped to componentMeta object, and i set cascade(javax.persistence.CascadeType) action = all, but relationship action in database still are Restrict (it's not update to cascade)</p>
  
  <p><strong>Here are Component object:</strong></p>
  
  <pre><code>@Entity
  @Table(name = "component")
  public class Component {
  
      private int                     idComponent;
      private List&lt;ComponentMeta&gt;     componentMetas;
  
      public Component() {
      }
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      public int getIdComponent() {
          return this.idComponent;
      }
  
      public void setIdComponent(int idComponent) {
          this.idComponent = idComponent;
      }
  
      @OneToMany(mappedBy = "component", cascade = CascadeType.ALL)
      public List&lt;ComponentMeta&gt; getComponentMetas() {
          return this.componentMetas;
      }
  
      public void setComponentMetas(List&lt;ComponentMeta&gt; componentMetas) {
          this.componentMetas = componentMetas;
      }
  }
  </code></pre>
  
  <p><strong>And ComponentMeta object:</strong> </p>
  
  <pre><code>@Entity
  @Table(name = "ComponentMeta")
  public class ComponentMeta {
  
      private int idComponentMeta;
      private Component component;
  
      public ComponentMeta() {
      }
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(name = "idComponentMeta", unique = true, nullable = false)
      public int getIdComponentMeta() {
          return idComponentMeta;
      }
  
      public void setIdComponentMeta(int idComponentMeta) {
          this.idComponentMeta = idComponentMeta;
      }
  
      @ManyToOne(cascade = CascadeType.ALL)
      @JoinColumn(name = "idComponent")
      public Component getComponent() {
          return component;
      }
  
      public void setComponent(Component component) {
          this.component = component;
      }
  }
  </code></pre>
  
  <p><strong>And there are picture about relationship actions in database(not update to cascade):</strong>
  <a href="https://i.stack.imgur.com/Iwl5K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Iwl5K.png" alt="enter image description here"></a></p>
  
  <p><strong>My hibernate config in spring boot(application.properties):</strong></p>
  
  <pre><code>spring.jpa.show-sql = true
  spring.jpa.hibernate.ddl-auto = update
  spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
  spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
  </code></pre>
  
  <p><strong>Why the relationship actions not auto update to cascade?</strong></p>