如何按ListProperty排序查詢*?按ListProperty排序查詢(NDB)
型號:
class Chapter(ndb.Model):
title = ndb.StringProperty(required=True)
version = ndb.IntegerProperty(repeated=True)
的 '版本' 專賣店值,如:
1.1 -> [1,1]
1 -> [1]
2.1.1.1.1 -> [2,1,1,1,1]
1.2 -> [1,2]
2.1.2 -> [2,1,2]
我想訂購,如:即時通訊使用NDB所以,的ListProperty
1
1.1
1.2
2.1.1.1.1
2.1.2
* = ndb.IntegerProperty(重複= True)
而我將如何排序與字符串?我已經重寫了我的模型很多次,因爲這...我只是想知道一種方式 – mFontoura 2013-02-15 17:29:59
版本是一個StringProperty,包含你想要的值 - '1.1','1.2.1.1.1'等 – Greg 2013-02-15 18:05:34
是但我如何分類?我不能只打電話給那種財產.........對嗎? – mFontoura 2013-02-15 18:07:58