openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albert Lee <allee8...@gmail.com>
Subject Re: [jira] [Commented] (OPENJPA-1912) enhancer generates invalid code if fetch-groups is activated
Date Wed, 12 Oct 2011 19:23:01 GMT
Typically, each branch releases are maintained by a "release manager" who
owns the content of that branch. It is because the branch may be productized
and requires stricter commits for quality control.

If you have a need to back port changes to previous release, you may want to
work it out with the branch's "release manager" or through their product
service process.


On Wed, Oct 12, 2011 at 8:41 AM, Yves Langisch (Commented) (JIRA) <
jira@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/OPENJPA-1912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13125849#comment-13125849]
>
> Yves Langisch commented on OPENJPA-1912:
> ----------------------------------------
>
> Is there any reason why this changeset is not backported to the other
> branches (1.2.x, 2.0.x)?
>
> > enhancer generates invalid code if fetch-groups is activated
> > ------------------------------------------------------------
> >
> >                 Key: OPENJPA-1912
> >                 URL: https://issues.apache.org/jira/browse/OPENJPA-1912
> >             Project: OpenJPA
> >          Issue Type: Bug
> >          Components: Enhance
> >    Affects Versions: 2.0.0, 2.0.1, 2.1.0
> >            Reporter: Mark Struberg
> >            Assignee: Michael Dick
> >            Priority: Critical
> >             Fix For: 2.2.0
> >
> >         Attachments: OPENJPA-1912-enhancer.patch,
> OPENJPA-1912-fix-wo_cleanup-2.patch, OPENJPA-1912-fix-wo_cleanup.patch,
> OPENJPA-1912-mdd.diff.txt, OPENJPA-1912-test.patch
> >
> >
> > If openjpa.DetachState =fetch-groups is used, the enhancer will add a
> 'implements Externalizable' + writeExternal + readExternal.
> > The problem is, that writeExternal and readExternal will also try to
> externalize the private members of any given superclass. Thus we get a
> runtime Exception that we are not allowed to access those fields.
> > Example:
> > @Entity
> > public abstract class AbstractGroup {
> >    ...
> >     @Temporal(TemporalType.TIMESTAMP)
> >     @TrackChanges
> >     private Date applicationBegin;
> >  ...
> > }
> > and
> > @Entity
> > public class Group extends AbstractGroup {
> > ...
> > }
> > will result in the following code (decompiled with jad):
> >     public void writeExternal(ObjectOutput objectoutput)
> >         throws IOException
> >     {
> >         pcWriteUnmanaged(objectoutput);
> >         if(pcStateManager != null)
> >         {
> >             if(pcStateManager.writeDetached(objectoutput))
> >                 return;
> >         } else
> >         {
> >             objectoutput.writeObject(pcGetDetachedState());
> >             objectoutput.writeObject(null);
> >         }
> >         objectoutput.writeObject(applicationBegin);
> >         objectoutput.writeObject(applicationEnd);
> >         objectoutput.writeObject(applicationLocked);
> >         objectoutput.writeObject(approvalRequired);
> >  ...
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>


-- 
Albert Lee.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message