2 Replies Latest reply on Aug 30, 2006 7:30 AM by cleonhar

    Problems with CascadeType.ALL

    cleonhar Newbie


      I have a question about the use of CascadeTypes.

      I am using jboss-4.0.4-GA with MySQL 4.0.15 (INNODB).

      I have annotated a getter like this:

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

      In the generated table I expect to get a foreign key with ON DELETE CASCADE, and ON UPDATE CASCADE. But if I check the created table a foreign key is created but without any CASCADES.

      Do I use the annotation wrong?