Re: Cannot read data from datastore that has just been persisted

31 views
Skip to first unread message

AndyD

unread,
Jan 9, 2013, 3:11:01 PM1/9/13
to google-a...@googlegroups.com
This might help: http://stackoverflow.com/questions/12358372/how-to-junit-test-entity-persistence-with-hrd-w-o-parent-relationship

If you're using Eclipse, the "unapplied job percentage" is specified in the App Engine tab of the Run Configurations dialog.

-Andy

On Wednesday, January 9, 2013 10:36:47 AM UTC-5, Dirk Vranckaert wrote:
I'm building some kind of synchronization service on AE (I'm still in my first month of GA experience) and the first step in my sync process is to sync a bunch of projects.
I do checks if I have to persist the project, update the project or just ignore the incoming project.
Next step is to sync tasks. But the tasks have a reference to a project (not necessarily the one of the projects synced before, but it can). And there the problem happens.

So in my test case I have persisted a project, then I do a lookup to find the project for which I want to sync a task. But the project is not found because it has just been created in step 1 and thus not comitted yet. At least I think that is the reason.

If I do another test-case in which a task is synced for a project that is already available in the database, the test case succeeds. So I'm not exactly sure what the exact problem is, but if I just persisted an object I cannot load it a second later...
So for me it must be or caching related or the transaction because it's not yet comitted...

Any help would be appreciated.. :-)
Reply all
Reply to author
Forward
0 new messages