3 Replies Latest reply on Mar 28, 2008 8:48 AM by porcherg

    testDeleteSimpleProcessVariables fails

    tom.baeyens

      test testDeleteSimpleProcessVariables in ProcessExecutionDbTest fails.

      Guillaume, I suspect that this is because this commit:

      807 created by porcherg on 26 March 2008, 06:27:21 -0400 (23 hours ago) (patch) db tests:
      - fail if transaction commit throws an exception
      - add test for cascade='all-delete-orphan'
      
      + /tempranillo/pvm/trunk/test/java/org/jbpm/db/DbTestCase.java 807 history download (+4 -4) diffs
      + /tempranillo/pvm/trunk/test/java/org/jbpm/db/pvm/ProcessExecutionDbTest.java 807 history download (+46 -0) diffs
      + /tempranillo/pvm/trunk/test/java/org/jbpm/db/pvm/PvmDbTests.java 807 history download (+1 -2) diffs


      Can you have a look ?

        • 1. Re: testDeleteSimpleProcessVariables fails
          porcherg

          I know that this test fails, I added it to show that cascade='all-delete-orphan' is needed in hibernate mappings.

          I sent a mail about this test:

          using only cascade="all" strategy creates some problems, because an element of
          a collection is removed from the db only when the owner is deleted. If an
          object is removed from the collection, it's not removed from db.

          with delete-orphan, when an object is removed from a collection, it is removed
          from the database.

          I added a test in the pvm test suite to show this (in ProcessExecutionDbTest).
          Setting cascade back to "all-delete-orphan" for variable scopes in execution
          fixes the test (in this test, a variable scope is removed from the execution,
          but not from the db).


          I can fix hibernate mappings if you want.

          regards,
          Guillaume

          • 2. Re: testDeleteSimpleProcessVariables fails
            tom.baeyens

            ah, right. no prob. i thought this already happened.

            it would be great if you could go over the collections and see which should be get that mapping.

            but feel free to say: do it yourself, as I changed it from right to wrong in the first place :-)

            • 3. Re: testDeleteSimpleProcessVariables fails
              porcherg

               

              "tom.baeyens@jboss.com" wrote:
              it would be great if you could go over the collections and see which should be get that mapping.


              ok. I will check the mappings.

              regards, Guillaume