2014-01-09 40 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 

有沒有人有想法?謝謝。

回答

相關問題