You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Tim McConnell (JIRA)" <ji...@apache.org> on 2009/07/31 06:24:15 UTC

[jira] Created: (OPENJPA-1214) RelationFieldStrategy behaviour

RelationFieldStrategy behaviour
-------------------------------

                 Key: OPENJPA-1214
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1214
             Project: OpenJPA
          Issue Type: Sub-task
            Reporter: Tim McConnell




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-1214) RelationFieldStrategy behaviour

Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876926#action_12876926 ] 

Pinaki Poddar commented on OPENJPA-1214:
----------------------------------------

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.



> RelationFieldStrategy behaviour
> -------------------------------
>
>                 Key: OPENJPA-1214
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1214
>             Project: OpenJPA
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Pinaki Poddar
>             Fix For: 1.3.0, 2.0.0-M3
>
>         Attachments: OPENJPA-1214-TESTCASE.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (OPENJPA-1214) RelationFieldStrategy behaviour

Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pinaki Poddar reopened OPENJPA-1214:
------------------------------------

      Assignee: Pinaki Poddar  (was: Donald Woods)

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.


 

> RelationFieldStrategy behaviour
> -------------------------------
>
>                 Key: OPENJPA-1214
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1214
>             Project: OpenJPA
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Pinaki Poddar
>             Fix For: 1.3.0, 2.0.0-M3
>
>         Attachments: OPENJPA-1214-TESTCASE.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OPENJPA-1214) RelationFieldStrategy behaviour

Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pinaki Poddar closed OPENJPA-1214.
----------------------------------

    Fix Version/s: 2.1.0
                       (was: 1.3.0)
                       (was: 2.0.0-M3)
       Resolution: Fixed

> RelationFieldStrategy behaviour
> -------------------------------
>
>                 Key: OPENJPA-1214
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1214
>             Project: OpenJPA
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Pinaki Poddar
>             Fix For: 2.1.0
>
>         Attachments: OPENJPA-1214-TESTCASE.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENJPA-1214) RelationFieldStrategy behaviour

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods resolved OPENJPA-1214.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0-M3
                   1.3.0

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

> RelationFieldStrategy behaviour
> -------------------------------
>
>                 Key: OPENJPA-1214
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1214
>             Project: OpenJPA
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Donald Woods
>             Fix For: 1.3.0, 2.0.0-M3
>
>         Attachments: OPENJPA-1214-TESTCASE.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OPENJPA-1214) RelationFieldStrategy behaviour

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods reassigned OPENJPA-1214:
-------------------------------------

    Assignee: Donald Woods  (was: Tim McConnell)

> RelationFieldStrategy behaviour
> -------------------------------
>
>                 Key: OPENJPA-1214
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1214
>             Project: OpenJPA
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Donald Woods
>             Fix For: 1.3.0, 2.0.0-M3
>
>         Attachments: OPENJPA-1214-TESTCASE.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1214) RelationFieldStrategy behaviour

Posted by "Tim McConnell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim McConnell updated OPENJPA-1214:
-----------------------------------

    Patch Info: [Patch Available]
      Assignee: Tim McConnell

> RelationFieldStrategy behaviour
> -------------------------------
>
>                 Key: OPENJPA-1214
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1214
>             Project: OpenJPA
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Tim McConnell
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1214) RelationFieldStrategy behaviour

Posted by "Tim McConnell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim McConnell updated OPENJPA-1214:
-----------------------------------

    Attachment: OPENJPA-1214-TESTCASE.patch

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.

> RelationFieldStrategy behaviour
> -------------------------------
>
>                 Key: OPENJPA-1214
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1214
>             Project: OpenJPA
>          Issue Type: Sub-task
>            Reporter: Tim McConnell
>            Assignee: Tim McConnell
>         Attachments: OPENJPA-1214-TESTCASE.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.