Re: JPAAnnotations on the instance variable or on the getter

2008-04-23 Thread Lars Vogel
Hi Mike, I'll give it a try. Thank you for your answer. Best regards, Lars 2008/4/21 Michael Dick <[EMAIL PROTECTED]>: > Hi Lars, > > It looks like you aren't hitting the same problem I was. > > Are you running the PCEnhancer tool to enhance your entity classes? I've > been able to reproduce the

Re: JPAAnnotations on the instance variable or on the getter

2008-04-21 Thread Michael Dick
Hi Lars, It looks like you aren't hitting the same problem I was. Are you running the PCEnhancer tool to enhance your entity classes? I've been able to reproduce the problem on OpenJPA 1.0.2 if the entities aren't enhanced prior to running the test. You'll see something like this in the logs if

Re: JPAAnnotations on the instance variable or on the getter

2008-04-20 Thread Lars Vogel
Hi Mike, even if I remove the @OrderBy annotation the error occurs. It seems that JPA cannot access the content of the list List. Please see my response to Janko. Best regards, Lars 2008/4/16, Michael Dick <[EMAIL PROTECTED]>: > > Hi Janko and Lars > > I'd forgotten about the restriction. When

Re: JPAAnnotations on the instance variable or on the getter

2008-04-20 Thread Lars Vogel
Hi Janko, the sytem gives me a NPE if I try to access the collection for Jobs. Exception in thread "main" java.lang.NullPointerException at main.Main.main(Main.java:77) This part is where my test code tries to access the list of jobs (indicated via // This is line 77) In my example this work

Re: JPAAnnotations on the instance variable or on the getter

2008-04-15 Thread Michael Dick
Hi Janko and Lars I'd forgotten about the restriction. When I saw that there was different behavior between property and field access I guessed it was something with the access level of his fields - maybe something in the subclassing support. I took a closer look at the example and I think the p

Re: JPAAnnotations on the instance variable or on the getter

2008-04-14 Thread Janko Heilgeist
Hi Michael, Michael Dick wrote: If you put the annotations on a get or set method then the JPA provider will expect property access to be used (ie PersonNew.setFirstName("John")). JPA specification, section 2.1.1: "[...] When property-based access is used, the object/relational mapping anno

Re: JPAAnnotations on the instance variable or on the getter

2008-04-14 Thread Michael Dick
Hi Lars, Where you put the annotations indicates whether you want to use property or field based access. If you put the annotations on a get or set method then the JPA provider will expect property access to be used (ie PersonNew.setFirstName("John")). If the annotations are on the field then a JP