Can you produce a test case that demonstrates this? It shouldn't
matter how the query is formulated. Entries in the session cache
supersede query results no matter what. In fact, the way this works
is that the query results get put into the session cache (without
overwrite) and the cache values are what get returned to the client.
If you see some other behavior, it's a bug. But I'm pretty sure there
are test cases covering this. Is it possible you are mixing up
Objectify instances in and out of transactions? Always use static
ofy(), don't hold on to Objectify references.
What do you mean by why can't queries work on the session cache?
Queries work on index data that lives in the datastore. As mentioned
above, queries in Objectify prefer to return entity data in the
session cache... but there always needs to be a request to the
datastore to know _which_ entities to return.
Jeff