Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-919

JUnit for Bi-directional OneToOne with null relationships

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 1.2.0
    • 1.2.1, 1.3.0, 2.0.0-M2
    • jdbc
    • None

    Description

      Testcase to verify relationships in a bi-directional OneToOne are null (as tested for by the EJB TCK) when:
      1) the relations are not set (should default to null)
      2) the relations are explicitly set to null

      Attachments

        1. jpa-nullrelation.tar.gz
          5 kB
          David Blevins
        2. OPENJPA-919-test-branches12x.patch
          18 kB
          Donald Woods
        3. OPENJPA-919-test-trunk.patch
          12 kB
          Donald Woods
        4. OPENJPA-919-trunk.patch
          6 kB
          Donald Woods

        Issue Links

          Activity

            drwoods Donald Woods added a comment -

            Patches to add a junit test to openjpa-persistence-jdbc to test for the null mappedBy relations.

            drwoods Donald Woods added a comment - Patches to add a junit test to openjpa-persistence-jdbc to test for the null mappedBy relations.
            drwoods Donald Woods added a comment -

            Unassign so a committer can review.

            drwoods Donald Woods added a comment - Unassign so a committer can review.
            drwoods Donald Woods added a comment -

            BTW - these tests prove that OpenJPA is handling null relationships correctly, as tested for in the EJB TCK...

            drwoods Donald Woods added a comment - BTW - these tests prove that OpenJPA is handling null relationships correctly, as tested for in the EJB TCK...
            dblevins David Blevins added a comment -

            Here's a test case that reproduces what I'm seeing. Like the custom id issue this test case passes if the relation names are changed, proving that there is some sort of case sensitive or sorting issue with the fields in the bean. Rename the 'C' fields to 'c' and the test will pass.

            dblevins David Blevins added a comment - Here's a test case that reproduces what I'm seeing. Like the custom id issue this test case passes if the relation names are changed, proving that there is some sort of case sensitive or sorting issue with the fields in the bean. Rename the 'C' fields to 'c' and the test will pass.
            dblevins David Blevins added a comment -

            Marking this as a bug.

            dblevins David Blevins added a comment - Marking this as a bug.
            drwoods Donald Woods added a comment -

            Thanks.

            drwoods Donald Woods added a comment - Thanks.
            drwoods Donald Woods added a comment -

            David, what do you mean by "Rename the 'C' fields to 'c' ..."? There are no 'C' fields in the attached testcase.... Are you referring to a testcase used for OPENJPA-838?

            drwoods Donald Woods added a comment - David, what do you mean by "Rename the 'C' fields to 'c' ..."? There are no 'C' fields in the attached testcase.... Are you referring to a testcase used for OPENJPA-838 ?
            drwoods Donald Woods added a comment -

            Simple null relation testcase. does not test for the more complex SQL/join/FK test from David, but verifies that simple null relations work.

            drwoods Donald Woods added a comment - Simple null relation testcase. does not test for the more complex SQL/join/FK test from David, but verifies that simple null relations work.
            techhusky Jeremy Bauer added a comment -

            I reviewed OPENJPA-919-trunk.patch provided by Donald and will commit to trunk shortly. While the test provided in this patch does not reproduce the subject problem, it is a good test to have in the suite.

            techhusky Jeremy Bauer added a comment - I reviewed OPENJPA-919 -trunk.patch provided by Donald and will commit to trunk shortly. While the test provided in this patch does not reproduce the subject problem, it is a good test to have in the suite.
            techhusky Jeremy Bauer added a comment -

            Committed OPENJPA-919-trunk.patch for Donald under revision 743473.

            techhusky Jeremy Bauer added a comment - Committed OPENJPA-919 -trunk.patch for Donald under revision 743473.

            Has anyone had the chance to look at David Blevin's jpa-nullrelation test case? It drives the failure scenario that is blocking Geronimo TCK.

            kevan Kevan Lee Miller added a comment - Has anyone had the chance to look at David Blevin's jpa-nullrelation test case? It drives the failure scenario that is blocking Geronimo TCK.
            drwoods Donald Woods added a comment -

            Sorry, I've been away since Thursday due to a family emergency. Will start looking at it again today.

            drwoods Donald Woods added a comment - Sorry, I've been away since Thursday due to a family emergency. Will start looking at it again today.
            drwoods Donald Woods added a comment -

            JUnit testcases that show simple null relations work, but the more complex example from David Blevins fails if the OneOneABean uses 'C' instead of 'c' as the variable name for the OneOneCBean relation.

            drwoods Donald Woods added a comment - JUnit testcases that show simple null relations work, but the more complex example from David Blevins fails if the OneOneABean uses 'C' instead of 'c' as the variable name for the OneOneCBean relation.
            drwoods Donald Woods added a comment -

            Converted testcase from David Blevins for trunk showing that complex relations fails.

            drwoods Donald Woods added a comment - Converted testcase from David Blevins for trunk showing that complex relations fails.
            drwoods Donald Woods added a comment -

            Looks like OPENJPA-925 fixed our test scenario on trunk, so I'm back porting the fix now to 1.2.x to verify it there....

            drwoods Donald Woods added a comment - Looks like OPENJPA-925 fixed our test scenario on trunk, so I'm back porting the fix now to 1.2.x to verify it there....
            drwoods Donald Woods added a comment -

            Problem resolved by changes made in OPENJPA-925. Waiting for Catalina to apply the fix to the 1.2.x branch before marking this as closed.

            drwoods Donald Woods added a comment - Problem resolved by changes made in OPENJPA-925 . Waiting for Catalina to apply the fix to the 1.2.x branch before marking this as closed.
            drwoods Donald Woods added a comment -

            OPENJPA-925 resolved this issue.

            drwoods Donald Woods added a comment - OPENJPA-925 resolved this issue.

            People

              Unassigned Unassigned
              drwoods Donald Woods
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: