I am trying to save an object and verify that it is saved right after, and it does not seem to work.
Here is my object
import com.googlecode.objectify.annotation.Entity; import com.googlecode.objectify.annotation.Id; @Entity public class PlayerGroup { @Id public String n;
Here is the code to save, then try downloading right after.
playerGroup = new PlayerGroup(); playerGroup.n = reqPlayerGroup.n; playerGroup.m = reqPlayerGroup.m; ofy().save().entity(playerGroup).now(); response.i = playerGroup; PlayerGroup newOne = ofy().load().type(PlayerGroup.class).id(reqPlayerGroup.n).get();
But the newOne object is null. Although I just finished this. What am I doing wrong?
- Update-- If I try later (for example, after a few minutes), sometimes I see an object, but not immediately after saving. Is it related to high replication storage?
google-app-engine loading objectify
b-ryce
source share