@@ 85-95 (lines=11) @@ | ||
82 | ||
83 | if (isset($mapping['simple']) && $mapping['simple']) { |
|
84 | $this->query[$mapping['name']] = $dbRef; |
|
85 | } else { |
|
86 | $keys = array('ref' => true, 'id' => true, 'db' => true); |
|
87 | ||
88 | if (isset($mapping['targetDocument'])) { |
|
89 | unset($keys['ref'], $keys['db']); |
|
90 | } |
|
91 | ||
92 | foreach ($keys as $key => $value) { |
|
93 | $this->query[$this->currentField . '.$' . $key] = $dbRef['$' . $key]; |
|
94 | } |
|
95 | } |
|
96 | } else { |
|
97 | $dbRef = $this->dm->createDBRef($document); |
|
98 | $this->query = $dbRef; |
|
@@ 115-125 (lines=11) @@ | ||
112 | ||
113 | if (isset($mapping['simple']) && $mapping['simple']) { |
|
114 | $this->query[$mapping['name']]['$elemMatch'] = $dbRef; |
|
115 | } else { |
|
116 | $keys = array('ref' => true, 'id' => true, 'db' => true); |
|
117 | ||
118 | if (isset($mapping['targetDocument'])) { |
|
119 | unset($keys['ref'], $keys['db']); |
|
120 | } |
|
121 | ||
122 | foreach ($keys as $key => $value) { |
|
123 | $this->query[$this->currentField]['$elemMatch']['$' . $key] = $dbRef['$' . $key]; |
|
124 | } |
|
125 | } |
|
126 | } else { |
|
127 | $dbRef = $this->dm->createDBRef($document); |
|
128 | $this->query['$elemMatch'] = $dbRef; |