Uploaded image for project: 'Hibernate ORM'
  1. HHH-7486

CascadeType.ALL is not equivalent to the combination of all other types

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Hibernate 4.1.5.SP1
      Databases: H2 1.2.145 and Oracle 11g
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      From the CascadeType javadoc:

      The value <code>cascade=ALL</code> is equivalent to

      • <code>cascade= {PERSIST, MERGE, REMOVE, REFRESH, DETACH}

        </code>

      However these cases are not equivalent - children entities are not persisted with the combination of types, but are persisted with the single CascadeType.ALL

      Simple test case is in the attachemnt.

        Attachments

          Activity

            People

            • Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: