0
votes

I have a _Client kind in the datastore which has a property named lastSeen.

Im executing this query;

SELECT __key__ FROM _Client WHERE (status = ONLINE AND lastSeen < 1385920960176) ORDER BY lastSeen DESC

And it returns this result;

Result:[key:_Client("CE:f3ccfa69-2c19-42e1-b9ae-bc87fffd5cc9"),
    lastSeen = 1385921035721    .......]

The problem is the returned record does not meet the criteria "lastSeen < 1385920960176". I have this index on the _Client kind;

<datastore-index kind="_Client" ancestor="false" source="manual">
    <property name="status" direction="asc"/>
    <property name="lastSeen" direction="desc"/>
</datastore-index>

I also tried the lastSeen index with asc direction and but the result was same. This is a Java App.

1
I'm guessing this is a Java app? You should really specify the programming language when asking something about gae.Remco Haszing
I edited the question, and yes this is a java app.Iarwa1N
Is this in dev_appserver, or deployed?Dave W. Smith

1 Answers

0
votes

I found the reason, it is the FilterDto implementation from the Mobile Backend Starter package. It was casting the operands to String with String.valueOf(v) while creating the query filter. So I guess my date filter was interpreted as a String comparison.