|
40 | 40 | #include "Firestore/core/src/firebase/firestore/model/field_value_options.h"
|
41 | 41 | #include "Firestore/core/src/firebase/firestore/nanopb/nanopb_util.h"
|
42 | 42 | #include "Firestore/core/src/firebase/firestore/util/hard_assert.h"
|
| 43 | +#include "Firestore/core/src/firebase/firestore/util/log.h" |
43 | 44 | #include "Firestore/core/src/firebase/firestore/util/string_apple.h"
|
44 | 45 |
|
45 | 46 | namespace util = firebase::firestore::util;
|
@@ -261,12 +262,11 @@ - (id)convertedReference:(const FieldValue &)value {
|
261 | 262 | const DatabaseId &refDatabase = ref.database_id();
|
262 | 263 | const DatabaseId &database = _snapshot.firestore()->database_id();
|
263 | 264 | if (refDatabase != database) {
|
264 |
| - // TODO(b/32073923): Log this as a proper warning. |
265 |
| - NSLog(@"WARNING: Document %@ contains a document reference within a different database " |
266 |
| - "(%s/%s) which is not supported. It will be treated as a reference within the " |
267 |
| - "current database (%s/%s) instead.", |
268 |
| - self.reference.path, refDatabase.project_id().c_str(), refDatabase.database_id().c_str(), |
269 |
| - database.project_id().c_str(), database.database_id().c_str()); |
| 265 | + LOG_WARN("Document %s contains a document reference within a different database (%s/%s) which " |
| 266 | + "is not supported. It will be treated as a reference within the current database " |
| 267 | + "(%s/%s) instead.", |
| 268 | + _snapshot.CreateReference().Path(), refDatabase.project_id(), |
| 269 | + refDatabase.database_id(), database.project_id(), database.database_id()); |
270 | 270 | }
|
271 | 271 | const DocumentKey &key = ref.key();
|
272 | 272 | return [[FIRDocumentReference alloc] initWithKey:key firestore:_snapshot.firestore()];
|
|
0 commit comments