Empty query on local datastore emulator

22 views
Skip to first unread message

solsTiCe d'Hiver

unread,
Aug 13, 2021, 3:38:57 AM8/13/21
to Google App Engine
Hi,
So I have migrated half of my app to ndb and flask on python3 runtime.

To finish the migration, I have exported my db and then imported in the datastore emulator to dev on my PC.

The data are there and some queries are ok. But something like that returns an empty array, and I don't understand why.

    q = Topic.query(Topic.forum == forum.key)

The Topic model includes a forum attribute as a KeyProperty

This request to the DB works fine on app engine cloud (not the emulator).

I can do  this on the emulator, and this finally works, but that is bad:

 q = Topic.query()
 topics = []
 for t in q.iter():
       if t.forum == forum.key:
           topics.append(t)

So why is this failing on the DB emulator ?
Reply all
Reply to author
Forward
0 new messages