Well I'm confused then. I've annotated my class with @PostLoad, @PrePersist and @PreUpdate.
The @PrePersist and @PreUpdate methods never get called, whether the methods are located in the @Entity annotated class or in a defined @EntityListeners annotated class. I've tried leaving the persistence to the DN dirty-checking persistence and also by manually re- persisting the entity using the EntityManager's persist method. The @PostLoad method is only ever called if the entity is loaded via the EntityManager's find method - if you retrieve a list of the entities via a JPA defined query then the @PostLoad method just isn't called. To the couple of people who have this working, have you got some example code/configuration you can share? On May 6, 10:15 am, Chau Huynh <cmhu...@gmail.com> wrote: > My entity classes were annotated, and work both in local and appspot. Thanks > > > > On Thu, May 6, 2010 at 4:02 PM, Simon <qila...@gmail.com> wrote: > > Has anyone managed to get the JPA lifecycle callbacks to work? > > > I've annotated methods with @PrePersist and @PostLoad and the methods > > just never get called. I followed the documentation at > > >http://www.datanucleus.org/products/accessplatform_2_0/jpa/lifecycle_... > > just to make sure that my methods had the correct signatures. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine for Java" group. > > To post to this group, send email to > > google-appengine-j...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to google-appengine-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.