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

Reply via email to