0 Replies Latest reply on Jan 27, 2006 9:45 AM by cleonhar

    Use of CascadeType.ALL CascadeType.REMOVE with MySQL

    cleonhar

      Hi everybody,

      I try to create two related tables using the @OneToMany-Annotation. I am using MySQL-InnoDB-Dialect.

      @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER)
      
      or
      
      @OneToMany(cascade=CascadeType.REMOVE, fetch=FetchType.EAGER)
      


      The tables and the foreign key are created in the database, but without a ON DELETE CASCADE statement.

      Do I have to specify something else to get a complete foreign key? Or is this a bug?

      Thanks
      Claus