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

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          7d 22h 12m 1 Donald Woods 18/Feb/09 19:41
          Resolved Resolved Closed Closed
          1d 47m 1 Donald Woods 19/Feb/09 20:28
          Donald Woods made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          Donald Woods added a comment -

          OPENJPA-925 resolved this issue.

          Show
          Donald Woods added a comment - OPENJPA-925 resolved this issue.
          Donald Woods made changes -
          Link This issue is duplicated by OPENJPA-925 [ OPENJPA-925 ]
          Donald Woods made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]
          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 -

          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....
          Donald Woods made changes -
          Attachment OPENJPA-919-test-trunk.patch [ 12400341 ]
          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.
          Donald Woods made changes -
          Attachment OPENJPA-919-test-branches12x.patch [ 12400338 ]
          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 -

          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
          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
          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
          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.
          Donald Woods made changes -
          Attachment OPENJPA-919-trunk.patch [ 12400020 ]
          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.
          Donald Woods made changes -
          Affects Version/s 2.0.0 [ 12313483 ]
          Affects Version/s 1.3.0 [ 12313326 ]
          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 ?
          Donald Woods made changes -
          Attachment OPENJPA-919-trunk.patch [ 12399947 ]
          Donald Woods made changes -
          Attachment OPENJPA-919-branches13x.patch [ 12399948 ]
          Donald Woods made changes -
          Attachment OPENJPA-919-branches12x.patch [ 12399949 ]
          Hide
          Donald Woods added a comment -

          Thanks.

          Show
          Donald Woods added a comment - Thanks.
          David Blevins made changes -
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          Priority Trivial [ 5 ] Critical [ 2 ]
          Hide
          David Blevins added a comment -

          Marking this as a bug.

          Show
          David Blevins added a comment - Marking this as a bug.
          David Blevins made changes -
          Attachment jpa-nullrelation.tar.gz [ 12399962 ]
          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
          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...
          Donald Woods made changes -
          Assignee Donald Woods [ drwoods ]
          Hide
          Donald Woods added a comment -

          Unassign so a committer can review.

          Show
          Donald Woods added a comment - Unassign so a committer can review.
          Donald Woods made changes -
          Attachment OPENJPA-919-branches13x.patch [ 12399948 ]
          Attachment OPENJPA-919-trunk.patch [ 12399947 ]
          Attachment OPENJPA-919-branches12x.patch [ 12399949 ]
          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.
          Donald Woods made changes -
          Field Original Value New Value
          Description Testcase to verify relationships in a bi-directional OneToOne are null when:
          1) the relations are not set (should default to null)
          2) the relations are explicitly set to null
          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
          Donald Woods created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development