質問

私はこのようなモデルを持っています:

class test (db.Model) :
 tagList = StringListProperty()
 siteName = StringProperty()
.

私は「TagList」にタグを格納しており、タグリスト内の特定のタグを含むすべてのテストエンティティを取得できるクエリを実行します。

これは可能ですか?

役に立ちましたか?

解決

平等演算子を使用するだけです。

q = test.all()
q.filter("tagList =", "some_tag")
q.fetch()
.

リストプロパティの場合、App Engineは 'Contains'として 'equals'を扱います。

http://code.google.com/AppEngine / docs / python / datastore / typesandpropertyclasses.html#listproperty 詳細は

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top