Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: None
    • Labels:
      None
    • Patch Info:
      Patch Available

      Activity

      Transition Time In Source Status Execution Times Last Executer Last Execution Date
      Open Open Resolved Resolved
      45d 12h 58m 1 Donald Woods 14/Sep/09 17:21
      Resolved Resolved Closed Closed
      176d 1h 9m 1 Donald Woods 09/Mar/10 18:31
      Closed Closed Reopened Reopened
      91d 7h 14m 1 Pinaki Poddar 09/Jun/10 01:46
      Reopened Reopened Closed Closed
      15h 44m 1 Pinaki Poddar 09/Jun/10 17:30
      Pinaki Poddar made changes -
      Status Reopened [ 4 ] Closed [ 6 ]
      Fix Version/s 2.1.0 [ 12314542 ]
      Fix Version/s 1.3.0 [ 12313326 ]
      Fix Version/s 2.0.0-M3 [ 12314148 ]
      Resolution Fixed [ 1 ]
      Hide
      Pinaki Poddar added a comment -

      The test case org.apache.openjpa.persistence.compat.TestEmbeddableSuperclass is actually an anti-test.
      It validates or masks the root cause of an otherwise serious error.

      Show
      Pinaki Poddar added a comment - The test case org.apache.openjpa.persistence.compat.TestEmbeddableSuperclass is actually an anti-test. It validates or masks the root cause of an otherwise serious error.
      Pinaki Poddar made changes -
      Resolution Fixed [ 1 ]
      Status Closed [ 6 ] Reopened [ 4 ]
      Assignee Donald Woods [ drwoods ] Pinaki Poddar [ ppoddar@apache.org ]
      Hide
      Pinaki Poddar added a comment -

      This needs to be further investigated to analyze why the strategy changed.
      Merely documenting that behavior has changed is not only insufficient, it may even be root of certain errors that will surface out downstream. Such errors can be hard to relate with this root cause..

      That is what the document says:
      "The FieldMapping.getStrategy() in OpenJPA 1.x returned an instance of RelationFieldStrategy for embded super classes, but will now return an EmbedFieldStrategy. "

      Here is the test that records this unexplained change in behavior.

      the definition of the field 'sup' in EmbeddableSuperSub

      public class EmbeddableSuperSub extends EmbeddableSuper

      { @ManyToOne private EmbeddableSuper sup; }

      where EmbeddableSuper is a MappedSuperclass.

      Firstly the names of the test classes are misleading because MappedSuperClass has nothing to do with being embeddable.
      Secondly there is no apparent explanation on why suddenly a many-to-one relation to a MappedSuperClass that used to be RelationFieldStrategy will now handled by a EmbedFieldStrategy

      My hypothesis is this issue is related to some other decisions we were making around embeddablity of a type.
      I am reopening to investigate further.

      Show
      Pinaki Poddar added a comment - This needs to be further investigated to analyze why the strategy changed. Merely documenting that behavior has changed is not only insufficient, it may even be root of certain errors that will surface out downstream. Such errors can be hard to relate with this root cause.. That is what the document says: "The FieldMapping.getStrategy() in OpenJPA 1.x returned an instance of RelationFieldStrategy for embded super classes, but will now return an EmbedFieldStrategy. " Here is the test that records this unexplained change in behavior. the definition of the field 'sup' in EmbeddableSuperSub public class EmbeddableSuperSub extends EmbeddableSuper { @ManyToOne private EmbeddableSuper sup; } where EmbeddableSuper is a MappedSuperclass. Firstly the names of the test classes are misleading because MappedSuperClass has nothing to do with being embeddable. Secondly there is no apparent explanation on why suddenly a many-to-one relation to a MappedSuperClass that used to be RelationFieldStrategy will now handled by a EmbedFieldStrategy My hypothesis is this issue is related to some other decisions we were making around embeddablity of a type. I am reopening to investigate further.
      Donald Woods made changes -
      Status Resolved [ 5 ] Closed [ 6 ]
      Donald Woods made changes -
      Status Open [ 1 ] Resolved [ 5 ]
      Fix Version/s 1.3.0 [ 12313326 ]
      Fix Version/s 2.0.0-M3 [ 12314148 ]
      Resolution Fixed [ 1 ]
      Hide
      Donald Woods added a comment -

      Testcase committed to 1.3.x as r814737 to show old behavior.
      Testcase and doc updates committed to trunk as r814739.

      Show
      Donald Woods added a comment - Testcase committed to 1.3.x as r814737 to show old behavior. Testcase and doc updates committed to trunk as r814739.
      Donald Woods made changes -
      Assignee Tim McConnell [ mcconne ] Donald Woods [ drwoods ]
      Tim McConnell made changes -
      Attachment OPENJPA-1214-TESTCASE.patch [ 12415100 ]
      Hide
      Tim McConnell added a comment -

      This patch demonstrates different behavior for the RelationFieldStrategy between 1.2.x and 2.0, which in fact may not be a true problem for users as the strategy implementation class is internal to OpenJPA. However wish to log all issues found for sake of completeness.

      Show
      Tim McConnell added a comment - This patch demonstrates different behavior for the RelationFieldStrategy between 1.2.x and 2.0, which in fact may not be a true problem for users as the strategy implementation class is internal to OpenJPA. However wish to log all issues found for sake of completeness.
      Tim McConnell made changes -
      Field Original Value New Value
      Assignee Tim McConnell [ mcconne ]
      Patch Info [Patch Available]
      Tim McConnell created issue -

        People

        • Assignee:
          Pinaki Poddar
          Reporter:
          Tim McConnell
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development