Re: Fetch lazy modeled entities in multiple hierarchical levels with criteria api

2012-01-17 Thread Pinaki Poddar
Hi, Please refer to documentation on OpenJPA FetchPlan [1]. [1] http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_fetch - Pinaki Poddar Chair, Apache OpenJPA Project -- View this message in context:

OpenJPA 2.1.1 and read entitys being marked as dirty

2012-01-17 Thread Michael Baylis
Hi Folks, I am experiencing an oddity that I can't google my way out of. I am running OpenJPA 2.1.1 under Tomcat 7.0.23 by using my own EntityManager object that I create when the application starts. What I am noticing is when I update a field in an entity and then commit the

Re: OpenJPA 2.1.1 and read entitys being marked as dirty

2012-01-17 Thread Rick Curtis
Michael - How are you enhancing your Entities? I have performed further testing by amending a query to be surrounded by a begin() and commit() and the commit causes the db records to be updated even though I know that no updates have taken place. What fields are being updated? All of them? Are

Re: OpenJPA 2.1.1 and read entitys being marked as dirty

2012-01-17 Thread Michael Baylis
Rick, As I am developing I am relying on runtime enhancement, however I have to have property name=openjpa.RuntimeUnenhancedClasses value=supported/ set. Cheers, Michael On 01/17/2012 03:20 PM, Rick Curtis wrote: Michael - How are you enhancing your Entities? I have performed

Re: OpenJPA 2.1.1 and read entitys being marked as dirty

2012-01-17 Thread Rick Curtis
Michael - I'm nearly certain that is your problem. I'd recommend getting build time enhancement[1] working. [1] http://openjpa.apache.org/entity-enhancement.html Thanks, Rick On Tue, Jan 17, 2012 at 9:22 AM, Michael Baylis maill...@baylishome.me.ukwrote: Rick, As I am developing I am

Re: OpenJPA 2.1.1 and read entitys being marked as dirty

2012-01-17 Thread Michael Baylis
Ok, switched to buildtime enhancement and getting different problems now!! Switched to working with a basic java project to resolve all the problems. When attempting to use :- Account account = em.find(Account.class, JL); I get:- Exception in thread main openjpa-2.1.1-r422266:1148538

Re: OpenJPA 2.1.1 and read entitys being marked as dirty

2012-01-17 Thread Pinaki Poddar
shows that Account.class had been enhanced before (possibly with a different version of openjpa library). Simply delete the Account.class file, recompile Account.java and run org.apache.openjpa.enhance.PCEnhancer on it. - Pinaki Poddar Chair, Apache OpenJPA Project -- View this message in