@@ 82-84 (lines=3) @@ | ||
79 | $qb->slaveOkay(true); |
|
80 | } |
|
81 | ||
82 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
83 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
84 | } |
|
85 | ||
86 | $qb->getQuery()->execute()->toArray(false); |
|
87 | }; |
@@ 710-712 (lines=3) @@ | ||
707 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
708 | $cursor->slaveOkay(true); |
|
709 | } |
|
710 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
711 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
712 | } |
|
713 | $documents = $cursor->toArray(false); |
|
714 | foreach ($documents as $documentData) { |
|
715 | $document = $this->uow->getById($documentData['_id'], $class); |
|
@@ 772-774 (lines=3) @@ | ||
769 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
770 | $qb->slaveOkay(true); |
|
771 | } |
|
772 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
773 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
774 | } |
|
775 | ||
776 | return $qb->getQuery(); |
|
777 | } |
|
@@ 821-823 (lines=3) @@ | ||
818 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
819 | $cursor->slaveOkay(true); |
|
820 | } |
|
821 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
822 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
823 | } |
|
824 | ||
825 | return $cursor; |
|
826 | } |