bdbdatastore icon indicating copy to clipboard operation
bdbdatastore copied to clipboard

Query with different results from default datastore

Open moraes opened this issue 15 years ago • 2 comments

I get different results in BDBDatastore and default datastore for the following query:

results = Query(Model).filter('created <', datetime.datetime(2009, 5, 3, 1, 59, 17)).order('-created').order('__key__').fetch(10)

There's an entity stored with created = datetime.datetime(2009, 5, 3, 1, 59, 17). It is returned as the first result where it should not.

moraes avatar May 29 '09 12:05 moraes

here is a demo of a query returning wrong results:

http://paste.pocoo.org/show/119841/

moraes avatar May 30 '09 00:05 moraes

This happens in queries that use a >= filter, or a <= filter and a descending sort order, where the first entity fetched exactly matches the filter, but extra fields in the index after the inequality cause the 'is equal' test for the initial entity to fail.

Arachnid avatar Jun 02 '09 16:06 Arachnid