Hi there! I'm having an issue with my reference resolution in my queries.
I have an 'event' collection and a 'person' collection that are referenced by KinveyReferences in the 'attendee' collection. When I query for an attendee entry, however, there are a lot references that don't get resolved (and I know they appropriate entry IDs exist in the referenced collection)
I'm now seeing that there is a limit of 100 resolutions to a query -- sorry I missed that earlier.
I am, however, still having an issues resolving both references in the entry. When I change the resolve to be "&resolve=person,event" it still will only resolve one of the references
C
Calvin Morooney
said
almost 7 years ago
OK I see what's happening now, my apologies. Just in case this trips up someone else along the way I'll leave the question up but basically I just didn't realize that the 100 resolutions would be as sporadic as they are.
If I don't limit my query to 100 objects, it will not just resolve the first 100 records fully but just pick 100 seemingly randomly (sorry I'm not super knowledgable) so I ended up with some responses that had just the event resolved, other with just the person resolved. Once I added the &limit=100 I was given fully resolved objects in response
C
Caroline
said
almost 7 years ago
Hey Calvin,
Wow, you answered your own question even faster than I could get to it! Kudos, to you.
Calvin Morooney
I have an 'event' collection and a 'person' collection that are referenced by KinveyReferences in the 'attendee' collection. When I query for an attendee entry, however, there are a lot references that don't get resolved (and I know they appropriate entry IDs exist in the referenced collection)
my query:
?query={"$and":[{"person":{"_id":"52a5fb0782682eae26c933d7","_type":"KinveyRef","_collection":"person"}},{"archived":{"$ne":true}}]}&resolve_depth=1
example of unresolved response:
{
"version": 1,
"person": {
"_id": "52a5fb0782682eae26c933d7",
"_type": "KinveyRef",
"_collection": "person"
},
"event": {
"_id": "530652da302983c10f009240",
"_type": "KinveyRef",
"_collection": "event"
},
"_id": "530652f50be19873290096a7",
"_kmd": {
"lmt": "2014-02-20T19:09:41.288Z",
"ect": "2014-02-20T19:09:41.288Z"
},
"_acl": {
"creator": "52a5fb0782682eae26c933d7"
}
}
Both the person AND the events exist in their respective collections, but I'm still getting null _obj fields. Any guess as to how to fix this?
Thanks
Cal