OpenJPA
  1. OpenJPA
  2. OPENJPA-919

JUnit for Bi-directional OneToOne with null relationships

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.1, 1.3.0, 2.0.0-M2
    • Component/s: jdbc
    • Labels:
      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

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

        Issue Links

          Activity

          Hide
          Donald Woods added a comment -

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

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

          Unassign so a committer can review.

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

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

          Show
          Donald Woods added a comment - BTW - these tests prove that OpenJPA is handling null relationships correctly, as tested for in the EJB TCK...
          Hide
          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.

          Show
          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.
          Hide
          David Blevins added a comment -

          Marking this as a bug.

          Show
          David Blevins added a comment - Marking this as a bug.
          Hide
          Donald Woods added a comment -

          Thanks.

          Show
          Donald Woods added a comment - Thanks.
          Hide
          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?

          Show
          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 ?
          Hide
          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.

          Show
          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.
          Hide
          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.

          Show
          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.
          Hide
          Jeremy Bauer added a comment -

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

          Show
          Jeremy Bauer added a comment - Committed OPENJPA-919 -trunk.patch for Donald under revision 743473.
          Hide
          Kevan 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.

          Show
          Kevan 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.
          Hide
          Donald Woods added a comment -

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

          Show
          Donald Woods added a comment - Sorry, I've been away since Thursday due to a family emergency. Will start looking at it again today.
          Hide
          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.

          Show
          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.
          Hide
          Donald Woods added a comment -

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

          Show
          Donald Woods added a comment - Converted testcase from David Blevins for trunk showing that complex relations fails.
          Hide
          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....

          Show
          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....
          Hide
          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.

          Show
          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.
          Hide
          Donald Woods added a comment -

          OPENJPA-925 resolved this issue.

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

            People

            • Assignee:
              Unassigned
              Reporter:
              Donald Woods
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development