asolfre / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
0 stars 0 forks source link

Query appears "frozen in time" within transaction, though documentation tells otherwise #221

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Inside a transaction, perform the below steps:
1. Load the largest ID of an Entity 'child' with ancestor 'parent'. Given no 
'child' entities exist, the returned ID should be null, and it is.
2. Add a 'child' entity with ID 1.
3. Perform step 1 again. Null is still returned.

What is the expected output? What do you see instead?
I expected to see ID 1 in step 3, because the documentation for Objectify 
states:
'There are some quirks at the low-level API: For example, get()s and query()s 
will see the datastore "frozen in time" and will not reflect updates even 
within the transaction. Objectify hides this behavior from you; subsequent 
fetches will see the same data seen (or updated) previously.'
(See 
https://code.google.com/p/objectify-appengine/wiki/Concepts#Transaction_Limitati
ons)

However, in this case, it does _NOT_ hide this behavior from me.

What version of the product are you using? On what operating system?
Objectify 5.0.5
AppEngine version 1.9.12
Windows 8 64bit

Please provide any additional information below.
The servlet attached shows the problem. I have only tested this on the 
development server.

Original issue reported on code.google.com by kfo...@gmail.com on 9 Oct 2014 at 7:56

Attachments:

GoogleCodeExporter commented 9 years ago
The Concepts document was not intended to go to that fine level of detail, but 
since you bring it up, I've added a note to that piece of documentation.

Objectify cannot replace GAE's query processor.

Original comment by lhori...@gmail.com on 9 Oct 2014 at 9:13