3

How can I use objectId of pointer column (manufacturerId) in my whereKey condition? The attempts bellow does not work, always return 0 rows. If I use a column of type String (not pointer) on whereKey, the query returns the correct result (only rows contained in array)

Attempt ONE

Let array = ["en7fURKoqz", "Y8DAuS2ypK"]
Let query = PFQuery (className: "Posts")
Query.includeKey ("manufacturerId")
Query.whereKey ("manufacturerId", containedIn: array)

Attempt TWO

Let array = ["en7fURKoqz", "Y8DAuS2ypK"]
Let query = PFQuery (className: "Posts")
Query.includeKey ("manufacturerId")
Query.whereKey ("manufacturerId.objectId", containedIn: array)

This Works fine

Let array = ["en7fURKoqz", "Y8DAuS2ypK"]
Let query = PFQuery (className: "Posts")
Query.whereKey ("manufacturerIdString", containedIn: array)
rmaddy
  • 314,917
  • 42
  • 532
  • 579

0 Answers0