我使用ndb模型作为我的数据库。我想要做的是在ID列表的基础上过滤结果。 我有我的模型,如:在ndb模式中通过ID筛选
class Photo(ndb.Model):
userid = ndb.StringProperty()
source = ndb.StringProperty()
handle = ndb.StringProperty()
sourceid =ndb.StringProperty()
,所以我想这样的查询:
queryset=Photo.query(Photo.key.id().IN(photoid_list))
我也曾尝试:
queryset=Photo.query(Photo.id().IN(photoid_list))
其中photoid_list是ID列表。 帮我解决它。
感谢您的回答:) – abhishek