2014-01-09 39 views
0

我想做一个查询,可以搜索与当前商店和产品代码的商店产品。该产品包含我需要的“类别”对象属性。我如何获得一个查询返回的内部查询的对象的对象属性与includeKey功能

我使用以下查询,但它始终返回商店产品及其产品对象属性,但不包括类别对象属性。

PFQuery *query = [StoreProduct query]; 

// Inner Query 
PFQuery *productQuery = [Product query]; 
[productQuery includeKey:@"categoryObject"]; // there is no need and it's not working but I tried 
[productQuery whereKey:@"code" equalTo:@(_number)]; 

[query whereKey:@"productObject" matchesQuery:productQuery]; 
[query whereKey:@"storeObject" equalTo:_currentStore]; 
[query includeKey:@"productObject"]; 

[query includeKey:@"productObject.categoryObject"]; // this is not working 

有没有人有想法?谢谢。

回答

相关问题