diff --git a/mockfirestore/query.py b/mockfirestore/query.py
index 354df4b..2e94f07 100644
--- a/mockfirestore/query.py
+++ b/mockfirestore/query.py
@@ -103,6 +103,7 @@ class Query:
                     index = idx
                 else:
                     index = None
+                    break
             if index is not None:
                 if before and start:
                     return islice(docs, index, None, None)

Query._apply_cursor is not working for similar objects
Following test will fail:
```
    def test_collection_start_after_similar_objects(self):
        fs = MockFirestore()
        fs._data = {'foo': {
            'first': {'id': 1, 'value': 1},
            'second': {'id': 2, 'value': 2},
            'third': {'id': 3, 'value': 2},
            'fourth': {'id': 4, 'value': 3}
        }}
        docs = list(fs.collection('foo').order_by('id').start_after({'id': 3, 'value': 2}).stream())
        self.assertEqual({'id': 4, 'value': 3}, docs[0].to_dict())
        self.assertEqual(1, len(docs))
```

Only last key in `document_fields` decides if index is set or not because of missing `brake` in search-compare loop inside `Query._apply_cursor`:

```
        for idx, doc in enumerate(doc_snapshot):
            index = None
            for k, v in document_fields.items():
                if doc.to_dict().get(k, None) == v:
                    index = idx
                else:
                    index = None
                    # missing break
            if index:
                ...
    
``` 


diff --git a/tests/test_collection_reference.py b/tests/test_collection_reference.py
index 5507811..361e3e0 100644
--- a/tests/test_collection_reference.py
+++ b/tests/test_collection_reference.py
@@ -255,6 +255,18 @@ class TestCollectionReference(TestCase):
         self.assertEqual({'id': 2}, docs[0].to_dict())
         self.assertEqual(2, len(docs))
 
+    def test_collection_start_after_similar_objects(self):
+        fs = MockFirestore()
+        fs._data = {'foo': {
+            'first': {'id': 1, 'value': 1},
+            'second': {'id': 2, 'value': 2},
+            'third': {'id': 3, 'value': 2},
+            'fourth': {'id': 4, 'value': 3}
+        }}
+        docs = list(fs.collection('foo').order_by('id').start_after({'id': 3, 'value': 2}).stream())
+        self.assertEqual({'id': 4, 'value': 3}, docs[0].to_dict())
+        self.assertEqual(1, len(docs))
+
     def test_collection_start_after_order_by(self):
         fs = MockFirestore()
         fs._data = {'foo': {

pip install -e .[dev]
parse_log_pytest
pytest
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio pytest
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///croot/attrs_1668696182826/work
certifi @ file:///croot/certifi_1671487769961/work/certifi
coverage==7.2.7
execnet==2.0.2
flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
-e git+https://github.com/mdowds/python-mock-firestore.git@2e1ebb817ba98a5e34700940bdc285bf4c318662#egg=mock_firestore
packaging @ file:///croot/packaging_1671697413597/work
pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pytest==7.1.2
pytest-asyncio==0.21.2
pytest-cov==4.1.0
pytest-mock==3.11.1
pytest-xdist==3.5.0
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
typing_extensions @ file:///croot/typing_extensions_1669924550328/work
zipp @ file:///croot/zipp_1672387121353/work

name: python-mock-firestore
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=22.1.0=py37h06a4308_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - flit-core=3.6.0=pyhd3eb1b0_0
  - importlib-metadata=4.11.3=py37h06a4308_0
  - importlib_metadata=4.11.3=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=22.0=py37h06a4308_0
  - pip=22.3.1=py37h06a4308_0
  - pluggy=1.0.0=py37h06a4308_1
  - py=1.11.0=pyhd3eb1b0_0
  - pytest=7.1.2=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py37h06a4308_0
  - typing_extensions=4.4.0=py37h06a4308_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.11.0=py37h06a4308_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==7.2.7
      - execnet==2.0.2
      - pytest-asyncio==0.21.2
      - pytest-cov==4.1.0
      - pytest-mock==3.11.1
      - pytest-xdist==3.5.0
prefix: /opt/conda/envs/python-mock-firestore

tests/test_collection_reference.py::TestCollectionReference::test_collection_start_after_similar_objects
tests/test_collection_reference.py::TestCollectionReference::test_collection_addDocument tests/test_collection_reference.py::TestCollectionReference::test_collection_end_at tests/test_collection_reference.py::TestCollectionReference::test_collection_end_at_order_by tests/test_collection_reference.py::TestCollectionReference::test_collection_end_before tests/test_collection_reference.py::TestCollectionReference::test_collection_end_before_order_by tests/test_collection_reference.py::TestCollectionReference::test_collection_get_collectionDoesNotExist tests/test_collection_reference.py::TestCollectionReference::test_collection_get_nestedCollection tests/test_collection_reference.py::TestCollectionReference::test_collection_get_nestedCollection_collectionDoesNotExist tests/test_collection_reference.py::TestCollectionReference::test_collection_get_ordersByAscendingDocumentId_byDefault tests/test_collection_reference.py::TestCollectionReference::test_collection_get_returnsDocuments tests/test_collection_reference.py::TestCollectionReference::test_collection_limit tests/test_collection_reference.py::TestCollectionReference::test_collection_limitAndOrderBy tests/test_collection_reference.py::TestCollectionReference::test_collection_listDocuments tests/test_collection_reference.py::TestCollectionReference::test_collection_offset tests/test_collection_reference.py::TestCollectionReference::test_collection_orderBy tests/test_collection_reference.py::TestCollectionReference::test_collection_orderBy_descending tests/test_collection_reference.py::TestCollectionReference::test_collection_orderby_offset tests/test_collection_reference.py::TestCollectionReference::test_collection_parent tests/test_collection_reference.py::TestCollectionReference::test_collection_start_after tests/test_collection_reference.py::TestCollectionReference::test_collection_start_after_order_by tests/test_collection_reference.py::TestCollectionReference::test_collection_start_at tests/test_collection_reference.py::TestCollectionReference::test_collection_start_at_order_by tests/test_collection_reference.py::TestCollectionReference::test_collection_stream tests/test_collection_reference.py::TestCollectionReference::test_collection_whereArrayContains tests/test_collection_reference.py::TestCollectionReference::test_collection_whereArrayContainsAny tests/test_collection_reference.py::TestCollectionReference::test_collection_whereEquals tests/test_collection_reference.py::TestCollectionReference::test_collection_whereGreaterThan tests/test_collection_reference.py::TestCollectionReference::test_collection_whereGreaterThanOrEqual tests/test_collection_reference.py::TestCollectionReference::test_collection_whereIn tests/test_collection_reference.py::TestCollectionReference::test_collection_whereLessThan tests/test_collection_reference.py::TestCollectionReference::test_collection_whereLessThanOrEqual tests/test_collection_reference.py::TestCollectionReference::test_collection_whereMissingField tests/test_collection_reference.py::TestCollectionReference::test_collection_whereNestedField
mockfirestore/query.py
mockfirestore/query.py