aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/Source/Core')
-rw-r--r--Firestore/Source/Core/FSTQuery.mm2
-rw-r--r--Firestore/Source/Core/FSTTransaction.mm6
-rw-r--r--Firestore/Source/Core/FSTView.mm4
3 files changed, 7 insertions, 5 deletions
diff --git a/Firestore/Source/Core/FSTQuery.mm b/Firestore/Source/Core/FSTQuery.mm
index 43b6356..626bbb6 100644
--- a/Firestore/Source/Core/FSTQuery.mm
+++ b/Firestore/Source/Core/FSTQuery.mm
@@ -767,7 +767,7 @@ NSString *FSTStringFromQueryRelationOperator(FSTRelationFilterOperator filterOpe
/* Returns YES if the document matches the path for the receiver. */
- (BOOL)pathMatchesDocument:(FSTDocument *)document {
- const ResourcePath &documentPath = document.key.path;
+ const ResourcePath &documentPath = document.key.path();
if ([FSTDocumentKey isDocumentKey:_path]) {
// Exact match for document queries.
return self.path == documentPath;
diff --git a/Firestore/Source/Core/FSTTransaction.mm b/Firestore/Source/Core/FSTTransaction.mm
index f97888a..b980a4e 100644
--- a/Firestore/Source/Core/FSTTransaction.mm
+++ b/Firestore/Source/Core/FSTTransaction.mm
@@ -30,6 +30,8 @@
#import "Firestore/Source/Util/FSTAssert.h"
#import "Firestore/Source/Util/FSTUsageValidation.h"
+#include "Firestore/core/src/firebase/firestore/model/document_key.h"
+
NS_ASSUME_NONNULL_BEGIN
#pragma mark - FSTTransaction
@@ -79,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
// when writing.
docVersion = [FSTSnapshotVersion noVersion];
}
- FSTSnapshotVersion *existingVersion = self.readVersions[doc.key];
+ FSTSnapshotVersion *existingVersion = self.readVersions[(FSTDocumentKey *)doc.key];
if (existingVersion) {
if (error) {
*error =
@@ -92,7 +94,7 @@ NS_ASSUME_NONNULL_BEGIN
}
return NO;
} else {
- self.readVersions[doc.key] = docVersion;
+ self.readVersions[(FSTDocumentKey *)doc.key] = docVersion;
return YES;
}
}
diff --git a/Firestore/Source/Core/FSTView.mm b/Firestore/Source/Core/FSTView.mm
index b2a39cb..b3cf189 100644
--- a/Firestore/Source/Core/FSTView.mm
+++ b/Firestore/Source/Core/FSTView.mm
@@ -216,8 +216,8 @@ static NSComparisonResult FSTCompareDocumentViewChangeTypes(FSTDocumentViewChang
newDoc = (FSTDocument *)maybeNewDoc;
}
if (newDoc) {
- FSTAssert([key isEqual:newDoc.key], @"Mismatching key in document changes: %@ != %@", key,
- newDoc.key);
+ FSTAssert([key isEqual:newDoc.key], @"Mismatching key in document changes: %@ != %s", key,
+ newDoc.key.ToString().c_str());
if (![self.query matchesDocument:newDoc]) {
newDoc = nil;
}