I am able to query a property of the class directly:
@StateObject var viewModel = PFTour.query("name" == "Notchtop")
.order([.descending("date")])
.includeAll()
.viewModel
But when I query on a relationship, I get no results:
@StateObject var viewModel = PFTour.query("route.state" == "Colorado")
.order([.descending("date")])
.includeAll()
.viewModel
Abbreviated parse objects are below. What am I getting wrong here?
struct PFTour: ParseObject {
//: These are required by ParseObject
var objectId: String?
var createdAt: Date?
var updatedAt: Date?
var ACL: ParseACL?
var originalData: Data?
//: Your own properties.
var name: String?
var published: Bool?
var route: PFRoute?
}
struct PFRoute: ParseObject {
//: These are required by ParseObject
var objectId: String?
var createdAt: Date?
var updatedAt: Date?
var ACL: ParseACL?
var originalData: Data?
//: Your own properties.
var name: String?
var area: String?
var state: String?
}
Does that query work for other SDKs? I know dot notation works when including nested data, but I don’t know about querying against it. You can post the .debugDescription Of your query and maybe someone on the server team can tell you if it should work.