Really.. using JPA has been a tragedy for me... I doubt if a real project can be built on App engine's current JPA support..
On Wed, Jun 9, 2010 at 2:03 PM, Simon <[email protected]> wrote: > I've had the same problem and to be honest my solution was to move > away from using JPA onto Objectify - at least there I know what is > happening, rather than relying on a partial implementation of the JPA > spec. It's much better suited to the underlying datastore anyway, > since JPA just isn't a good fit for BigTable. > > On Jun 8, 10:10 am, Sudhir Ramanandi <[email protected]> wrote: > > Ohh, sorry.. in the example, I gave a wrong class name > > "UnownedRelationLoader" > > Its FooEntityListner and still it does not work > > > > public class FooEntityListner { > > public void postLoad(BaseEntity entity) { > > --- > > > > > > > > } > > ---------- Forwarded message ---------- > > From: Sudhir Ramanandi <[email protected]> > > Date: Tue, Jun 8, 2010 at 2:37 PM > > Subject: JPA entity listner callbacks are not invoked when using Query > API > > To: [email protected] > > > > When an entity is loaded using query, postLoad() call back is not > invoked. > > postLoad() works only with entityManager.find(clazz, id) > > > > As per the JPA specification: > > "The PostLoad method is invoked before a query result is returned or > > accessed or before an association is traversed." > > > > Example: > > > > @EntityListeners(value={FooEntityListner.class}) > > @Entity > > public class Foo extends BaseEntity { > > > > } > > > > public class UnownedRelationLoader { > > public void postLoad(BaseEntity entity) { > > --- > > } > > > > Query q = getEntityManager().createQuery("select from " + > > Foo.class.getName()); > > > > callback will not be called in above case. > > > > Reported the issue herehttp:// > code.google.com/p/googleappengine/issues/detail?id=3326 > > Please vote for it. > > > > -- > > Sudhir Ramanandihttp://www.ramanandi.org > > > > -- > > Sudhir Ramanandihttp://www.ramanandi.org- Hide quoted text - > > > > - Show quoted text - > > -- > 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 > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- Sudhir Ramanandi http://www.ramanandi.org -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
