Open ratzr15 opened 6 years ago
@ratzr15 are you sure this isn't a server side issue?
@markst Nope, I have always had issue accessing more than one relationship. I'm able to load more than one relationship as :var query = Query(resourceType: MyResource.self, resourceCollection: resource.respurce_children!)
But it increases the number of Spine requests for example if have to get resource1.resource1relation,resource2,resource3
I have to make 3 Spine requests to get the relative data.
Any example on how to load more than one relationship would be really appreciated.
@markst Figured it out 🤤
I should be querying relationships as [String]
query.include("relation1.child,relation2,relation3")
should be as query.include("relation1.child","relation2","relation3")
I'm trying to get more than one relationship using
,
include
As : "
relationship1.relationship1.child,relationship1
"I'm registering the
Query
for the Resource associated and passing theResourceID
But only one of the Resource gets loaded.
My Query:
What am i missing here ?