is there any possibility to call method just before making object persistent?
Something like “onMakeObjectPersistent()”
I want to calculate geohash basing on lon and lat and store it in datastore.
Regars,
M
Solution:
as @Duy Do post:
in JDO we can do that using jdoPreStore() method:
@PersistenceCapable
public class Foo implements StoreCallback{
public void jdoPreStore()
//do something
}
}
I have not use GAE but I think if you use JPA you can use PrePesist annotation along with method you want to call before the object is persisted. With JDO you can use method jdoPreStore().