Hi Joel,

I think you have hit on it, if you can run
org.apache.openjpa.enhance.PCEnhancer and it works fine then the issue is
with the enhancer, Pinaki can tell you more about the 100 different reasons
for this .  Also I should say that I ran runtime enhancement for months
because it was easier than messing around with ant, then I spend 10 times as
long trying to pinpoint inconsistent behaviours, only to blow my project
deadline.  Finally I gave in and ran the ant task and it all went away. I
can't get that part of my life back but I can pass on my experiences :) 

Good luck!

Chris


-----Original Message-----
From: Joel Halbert [mailto:j...@su3analytics.com] 
Sent: Tuesday, 23 November 2010 12:42 AM
To: users@openjpa.apache.org
Subject: Re: OpenJPA Eclipse Tooling plugin - missing entity relationships

That is likely good advice Chris.
I should point out that if I run org.apache.openjpa.enhance.PCEnhancer
manually it all works fine.

Given that I can live with runtime enhanced classes when running & testing
from Eclipse, and I can manually compile-time enhance when releasing code
using ant, I guess I'll leave the ecipse plugin fttb.

Joel

On 22/11/10 13:34, C N Davies wrote:
> Don't waste your time with anything other than the ant built,  all 
> these plugins and such will drive you mad tying to troubleshoot issues 
> completely unrelated to enhancement. I learned this the hard way 
> because I was trying to avoid using ant, it's an apache project so they
expect you to use ant.
>
> Chris
>
>
>
> -----Original Message-----
> From: Joel Halbert [mailto:j...@su3analytics.com]
> Sent: Monday, 22 November 2010 11:52 PM
> To: users@openjpa.apache.org
> Subject: OpenJPA Eclipse Tooling plugin - missing entity relationships
>
> Hi,
>
> I have installed the OpenJPA Eclipse Tooling plugin, to provide 
> compile time enhancement.
> My source spans two projects, project1&  project2. The code in 
> project2 is dependent on project1.
> I have some entities in project2 that have a ManyToOne attribute, 
> using an Entity in project1.  e.g.
>
> @Entity
> @Access(AccessType.PROPERTY)
> Project1Entity {
>
>       private Project2Entity project2Entity;
>
>       @ManyToOne
>       public Project2Entity getProject2Entity () {
>           return project2Entity;
>       }
>       public voidsetProject2Entity (Project2Entity e) {
>           this.project2Entity = e;
> }
> }
>
>
>
> This used to work fine with runtime enhancement, but it no longer 
> works with compile time enhancement - when the Project1Entity table is 
> created it is now missing the Project2Entity field.
>
> Could this be related to the fact that my entities are across two 
> distinct eclipse projects? Both projects have the openjpa Bytecode
enhancer set.
>
> Thanks
> Joel
>
>

Reply via email to