Open saisrinivas25 opened 7 years ago
METDocument
s have a key
property, which is an instance of METDocumentKey
, which has a documentID
property.
I tried it earlier, but the xcode threw an error saying documentID is not a property of NSString. This time I tried it again with instantiating the key to a separate variable first and then got the documentID from it. Thank you so much. METDocumentKey docKey = [collection[i] key]; documentID = [docKey documentID];
I did this to return the documentId. Ignore the sharedInstance. That's just me creating a singleton for easy use. the documentKeyFoObjectID is what's important return [[MeteorSession sharedInstance]documentKeyForObjectID:self.objectID].documentID;
Hi,
I am using subscription to get documents from the server. And then storing them in METCollection object. Code: METCollection collection = [client.database collectionWIthName:@"database"]; NSArray array = [collection allDocuments];
Now, I want to get the document ID of individual documents while looping through the array. I have gone through the source code, but I could not find anything that gives ID of the document.
Please tell me how to get the documentID from the document.
Thanks & Regards, Srinivas