Re: Audit log with OpenJPA

2011-07-19 Thread Mark Struberg
Yes, I just mentioned it because in my case it made a _huge_ difference when working with previously detached entities which got em.merged(). I don't know the exact scenario, but since EntityManagers are not Serializable, there is detachment needed in a lot cases. At least if you need it also wo

Re: Audit log with OpenJPA

2011-07-19 Thread Mark Struberg
Yes, I just mentioned it because in my case it made a _huge_ difference when working with previously detached entities which got em.merged(). I don't know the exact scenario, but since EntityManagers are not Serializable, there is detachment needed in a lot cases. At least if you need it also wo

Re: PCEnhancer and java.lang.ClassNotFoundException

2011-07-19 Thread Pinaki Poddar
Also append a hash tag of the unit name to persistence.xml. i.e for a persistence unit named 'xyz' $ java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml#xyz Ensure the following a) persistence.xml declares all the classes to be enhanced in clause b) the classpath contains all the cl

Re: Best practice: Using fetch groups or a "simple" DTO?

2011-07-19 Thread Pinaki Poddar
Hi Walter, > What is best practice? FetchPlan - Pinaki Poddar Chair, Apache OpenJPA Project -- View this message in context: http://openjpa.208410.n2.nabble.com/Best-practice-Using-fetch-groups-or-a-simple-DTO-tp6598057p6599040.html Sent from the OpenJPA Users mailing list archive at Nabble.

Re: Audit log with OpenJPA

2011-07-19 Thread Pinaki Poddar
Hi Bengt, It is not obvious to me how DetachState related options will impact in-transaction entities. But I am interested to know the result of your experiment with the options Mark has suggested. I will recommend you make sure the following 1. Enhance at build time 2. Set openjpa.Restor

Re: Audit log with OpenJPA

2011-07-19 Thread Bengt Rodehav
Thanks Mark, I'll give it a try. However, it seems a bit shaky if this is not officially supported by OpenJPA. Do you know if this will clearly be supported in the future? /Bengt Den 17 jul 2011 02:45 skrev "Mark Struberg" : > It does keep track, but you might need to experiment a bit with your p

Re: PCEnhancer and java.lang.ClassNotFoundException

2011-07-19 Thread Rick Curtis
First off, I'd be interested in hearing about the problems that you encountered when trying to get PCEnhancer working in eclipse. Secondly, try something like this : java -classpath /home/luzer/zpd/zpd-ws/jpa_demo/JpaDemo/bin/resourceMgr/model:/home/luzer/tools/apache-openjpa-2.1.0/openjpa-all-2.1

Best practice: Using fetch groups or a "simple" DTO?

2011-07-19 Thread M. Walter
I have a big entity with lots of data which I don't need to send to my client. Only the primary key and a string should be delivered. All in all I have to send 6 entities. Now I have two possibilities: 1) I create a simple DTO with just the two required fields and fill it up with JPA's constru

PCEnhancer and java.lang.ClassNotFoundException

2011-07-19 Thread abuwz
Hi, I'm trying to enhance my entities at build time. After failing to get the ant script for eclipse working, I decided to run the PCEnhancer manually, without luck though. When I run PCEnhacer with the following cmd line: [luzer@cipoc JpaDemo]$ java -classpath /home/luzer/zpd/zpd-ws/jpa_demo/Jp