endpoints-proto-datastore无法摆脱默认过滤器

时间:2015-07-08 13:47:18

标签: google-app-engine google-cloud-endpoints endpoints-proto-datastore

我有一个名为“文件”的EndpointsModel,其中包含一些字段:

path = ndb.StringProperty()
filedata = ndb.TextProperty()
check = ndb.BooleanProperty(default=False)
of = ndb.BooleanProperty(default=False)
created = ndb.DateTimeProperty(auto_now_add=True)
updated = ndb.DateTimeProperty(auto_now=True)

我正在使用端点 - proto-datastore查询方法:

@NativFile.query_method(query_fields=('limit', 'order', 'pageToken',
    'created', 'check', 'of'),
    path='files/all', name='query')
def NativFileList(self, query):
    print query # For Debug
    return query

我正在向没有参数的端点发送GET请求(仅限于= 10)。但是,当应用打印查询时,我可以看到ofcheck的过滤器的默认值为false

如何摆脱此默认过滤器?

1 个答案:

答案 0 :(得分:0)

要覆盖默认过滤器,请设置您自己的过滤器。如果您不想过滤,请尝试使过滤器过于笼统。

相关问题