我对谷歌应用引擎很陌生。我知道谷歌数据存储不是 sql,但我试图在其中获得多对多的关系行为。正如您在下面看到的,我有 Gif 实体和 Tag 实体。我希望我的应用程序通过相关标签搜索 Gif 实体。这是我所做的;
class Gif(ndb.Model):
    author = ndb.UserProperty()
    link = ndb.StringProperty(indexed=False)
class Tag(ndb.Model):
    name = ndb.StringProperty()
class TagGifPair(ndb.Model):
    tag_id = ndb.IntegerProperty()
    gif_id = ndb.IntegerProperty()
    @classmethod
    def search_gif_by_tag(cls, tag_name)
        query = cls.query(name=tag_name)
        # I am stuck here ...
这是一个正确的开始吗?如果是这样,我该如何完成它。如果没有,怎么办?