@@ 84-86 (lines=3) @@ | ||
81 | $qb->slaveOkay(true); |
|
82 | } |
|
83 | ||
84 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
85 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
86 | } |
|
87 | ||
88 | $qb->getQuery()->execute()->toArray(false); |
|
89 | }; |
@@ 768-770 (lines=3) @@ | ||
765 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
766 | $cursor->slaveOkay(true); |
|
767 | } |
|
768 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
769 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
770 | } |
|
771 | $documents = $cursor->toArray(false); |
|
772 | foreach ($documents as $documentData) { |
|
773 | $document = $this->uow->getById($documentData['_id'], $class); |
|
@@ 835-837 (lines=3) @@ | ||
832 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
833 | $qb->slaveOkay(true); |
|
834 | } |
|
835 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
836 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
837 | } |
|
838 | foreach ($mapping['prime'] as $field) { |
|
839 | $qb->field($field)->prime(true); |
|
840 | } |
|
@@ 899-901 (lines=3) @@ | ||
896 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
897 | $cursor->slaveOkay(true); |
|
898 | } |
|
899 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
900 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
901 | } |
|
902 | ||
903 | return $cursor; |
|
904 | } |