@@ 104-112 (lines=9) @@ | ||
101 | ->getCollection($targetCollectionName); |
|
102 | ||
103 | // check if relation already resolved |
|
104 | if (isset($this->resolvedRelationIds[$relationName])) { |
|
105 | if (is_array($this->resolvedRelationIds[$relationName])) { |
|
106 | // has_many, many_many |
|
107 | return $foreignCollection->getDocuments($this->resolvedRelationIds[$relationName]); |
|
108 | } else { |
|
109 | //has_one, belongs |
|
110 | return $foreignCollection->getDocument($this->resolvedRelationIds[$relationName]); |
|
111 | } |
|
112 | } |
|
113 | ||
114 | switch ($relationType) { |
|
115 |
@@ 56-64 (lines=9) @@ | ||
53 | ->getCollection($targetCollectionName); |
|
54 | ||
55 | // check if relation already resolved |
|
56 | if (isset($this->resolvedRelationIds[$relationName])) { |
|
57 | if(is_array($this->resolvedRelationIds[$relationName])) { |
|
58 | // has_many, many_many |
|
59 | return $foreignCollection->getDocuments($this->resolvedRelationIds[$relationName]); |
|
60 | } else { |
|
61 | //has_one, belongs |
|
62 | return $foreignCollection->getDocument($this->resolvedRelationIds[$relationName]); |
|
63 | } |
|
64 | } |
|
65 | ||
66 | switch ($relationType) { |
|
67 |