@@ 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 | }; |
@@ 761-763 (lines=3) @@ | ||
758 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
759 | $cursor->slaveOkay(true); |
|
760 | } |
|
761 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
762 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
763 | } |
|
764 | $documents = $cursor->toArray(false); |
|
765 | foreach ($documents as $documentData) { |
|
766 | $document = $this->uow->getById($documentData['_id'], $class); |
|
@@ 824-826 (lines=3) @@ | ||
821 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
822 | $qb->slaveOkay(true); |
|
823 | } |
|
824 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
825 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
826 | } |
|
827 | foreach ($mapping['prime'] as $field) { |
|
828 | $qb->field($field)->prime(true); |
|
829 | } |
|
@@ 888-890 (lines=3) @@ | ||
885 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
886 | $cursor->slaveOkay(true); |
|
887 | } |
|
888 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
889 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
890 | } |
|
891 | ||
892 | return $cursor; |
|
893 | } |