0

我在 iPhone 应用程序中使用 FatFractal 作为后端。一直在搜索网络和 FatFractal 文档,但没有任何运气。我想从手提包中检索集合中的最新对象:

NSArray *result = [[Store ff] grabBagGetAllForObj:thread grabBagName:@"messages" withQuery:@"Get the latest inserted object" error:&err];
4

1 回答 1

1

可能最好的方法是自己构建完整的查询,然后使用标准getArrayFromUri:方法。以您为例,这看起来像:

FatFractal *ff = [Store ff];
NSString *query = [NSString stringWithFormat:
                   @"%@/messages?sort=createdAt desc&start=0&count=1",
                   [ff metaDataForObj:thread].ffUrl];
NSArray *result = [ff getArrayFromUri:query];

有关详细信息,请参阅http://fatfractal.com/prod/docs/queries/#sorting-and-limiting-results

于 2013-10-27T03:40:14.923 回答