You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Rick McGuire <ri...@gmail.com> on 2008/07/09 16:48:01 UTC

Where does the ENHANCEED_FIELDS list in CmpJpaConversion come from?

The CmpJpaConversion.mapFields() method uses a list called the 
"ENHANCEED_FIELDS" to mark a number of fields as transient.  Some of 
these certainly make a lot of sense, such as "serialVersionUID" and 
"class$Ljava$lang$String".  I am curious about the different "pc*" 
fields.  I've not found any reference to these in the OPENEJB code.  Are 
these fields something that would be generated by JPA?  Are they OpenJPA 
specific, or something that any JPA implementation would be using?  I'm 
particularly curious if this is something that would need to change if 
support for additional JPA engines (e.g., EclipseLink) were to be added.

Rick

Re: Where does the ENHANCEED_FIELDS list in CmpJpaConversion come from?

Posted by Karan Malhi <ka...@gmail.com>.
This codebase in openjpa used to be part of Kodo(solarmetric). I think it
adds the pc* classes after enhancements. The references to other fields like
StateManager etc are all remnants from JDO Enhancement requirements

On Wed, Jul 9, 2008 at 1:08 PM, Dain Sundstrom <da...@iq80.com> wrote:

> On Jul 9, 2008, at 7:48 AM, Rick McGuire wrote:
>
>  The CmpJpaConversion.mapFields() method uses a list called the
>> "ENHANCEED_FIELDS" to mark a number of fields as transient.  Some of these
>> certainly make a lot of sense, such as "serialVersionUID" and
>> "class$Ljava$lang$String".  I am curious about the different "pc*" fields.
>>  I've not found any reference to these in the OPENEJB code.  Are these
>> fields something that would be generated by JPA?  Are they OpenJPA specific,
>> or something that any JPA implementation would be using?  I'm particularly
>> curious if this is something that would need to change if support for
>> additional JPA engines (e.g., EclipseLink) were to be added.
>>
>
> When OpenJPA enhances classes, it adds "pc*" fields, and I found that
> sometimes our generation code would see these fields and get confused.  The
> pc* hack seemed to make the problem go away, and I never got back to looking
> at the problem in depth.  It is possible we would need additional hacks for
> eclipse link; I just don't know for sure.
>
> -dain
>



-- 
Karan Singh Malhi

Re: Where does the ENHANCEED_FIELDS list in CmpJpaConversion come from?

Posted by Dain Sundstrom <da...@iq80.com>.
On Jul 9, 2008, at 7:48 AM, Rick McGuire wrote:

> The CmpJpaConversion.mapFields() method uses a list called the  
> "ENHANCEED_FIELDS" to mark a number of fields as transient.  Some of  
> these certainly make a lot of sense, such as "serialVersionUID" and  
> "class$Ljava$lang$String".  I am curious about the different "pc*"  
> fields.  I've not found any reference to these in the OPENEJB code.   
> Are these fields something that would be generated by JPA?  Are they  
> OpenJPA specific, or something that any JPA implementation would be  
> using?  I'm particularly curious if this is something that would  
> need to change if support for additional JPA engines (e.g.,  
> EclipseLink) were to be added.

When OpenJPA enhances classes, it adds "pc*" fields, and I found that  
sometimes our generation code would see these fields and get  
confused.  The pc* hack seemed to make the problem go away, and I  
never got back to looking at the problem in depth.  It is possible we  
would need additional hacks for eclipse link; I just don't know for  
sure.

-dain