Skip to content

Commit dcc0332

Browse files
committed
SQLiteRemoteDocumentCache.java: make sure to include rows where document_type is null
1 parent 80a65cc commit dcc0332

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/local/SQLiteRemoteDocumentCache.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ private Map<DocumentKey, MutableDocument> getAll(
220220
"SELECT contents, read_time_seconds, read_time_nanos, path "
221221
+ "FROM remote_documents "
222222
+ "WHERE path >= ? AND path < ? AND path_length = ? "
223-
+ (filterDocumentType == null ? "" : " AND document_type = ? ")
223+
+ (filterDocumentType == null
224+
? ""
225+
: " AND (document_type IS NULL OR document_type = ?) ")
224226
+ "AND (read_time_seconds > ? OR ( "
225227
+ "read_time_seconds = ? AND read_time_nanos > ?) OR ( "
226228
+ "read_time_seconds = ? AND read_time_nanos = ? and path > ?)) ",

0 commit comments

Comments
 (0)