|
@@ 159-166 (lines=8) @@
|
| 156 |
|
* |
| 157 |
|
* @return void |
| 158 |
|
*/ |
| 159 |
|
public function hydrateAdd($element) |
| 160 |
|
{ |
| 161 |
|
$this->collection->add($element); |
| 162 |
|
|
| 163 |
|
if ($this->backRefFieldName && $this->association['type'] === ClassMetadata::ONE_TO_MANY) { |
| 164 |
|
$this->completeBidirectionalAssociationLink($element); |
| 165 |
|
} |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
/** |
| 169 |
|
* Sets the owner on the inverse side of the association, when the property was not set yet |
|
@@ 199-206 (lines=8) @@
|
| 196 |
|
* |
| 197 |
|
* @return void |
| 198 |
|
*/ |
| 199 |
|
public function hydrateSet($key, $element) |
| 200 |
|
{ |
| 201 |
|
$this->collection->set($key, $element); |
| 202 |
|
|
| 203 |
|
if ($this->backRefFieldName && $this->association['type'] === ClassMetadata::ONE_TO_MANY) { |
| 204 |
|
$this->completeBidirectionalAssociationLink($element); |
| 205 |
|
} |
| 206 |
|
} |
| 207 |
|
|
| 208 |
|
/** |
| 209 |
|
* Initializes the collection by loading its contents from the database |