Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2282

Various Update Issues With Vertical Inheritance

    XMLWordPrintableJSON

Details

    Description

      The two tests in the attached "breaking-test" patch show the two scenarios that are broken.

      1) testUpdateTwoObjectsWithMultipleAttributeAndMultipleRelationship : breaks because of the relationship change. Without changing relationship the update actually works fine. But with the relationship change its going through DataDomainIndirectDiffBuilder.arcDeleted and DataDomainIndirectDiffBuilder.arcCreated thus creating flattened Insert and Delete statements instead of an UPDATE statement.

      2) testUpdateWithOptimisticLocks : breaks because the vertically inherited ObjEntity has an attribute using Optimistic Lock for a field that is actually on the parent DbEntitity, and the Update query that is built is incorrectly referencing the column on the wrong table for the qualifierExpression.

      I actually already have a fix ready for this 2nd issue, but want to get both of these issues fixed in this ticket, so anyone helping on this issue please focus on fixing the first test.

      Attachments

        1. breaking_test.patch
          18 kB
          Matt Watson
        2. fixes-2-testUpdateWithOptimisticLocks.patch
          0.9 kB
          Matt Watson

        Activity

          People

            ntimofeev Nikita Timofeev
            mattraydub Matt Watson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: