如何在本地数据中通过createdAt获取排序结果

时间:2015-05-27 01:19:41

标签: parse-platform

我想从本地数据中获取由createdAt排序的结果,但是本地数据中的createdAt为nil。我该怎么办?

NG(createdAt为零)

object.pinInBackgroundWithBlock { (succeeded, error) in
    var query = PFQuery(className: "Messages")
    query.whereKey("createdAt", greaterThanOrEqualTo : object.createdAt!)

object.saveInBackgroundWithBlock { (succeeded, error) in
    var query = PFQuery(className: "Messages")
    query.whereKey("createdAt", greaterThanOrEqualTo : object.createdAt!)

0 个答案:

没有答案