Méthode | Description | |
---|---|---|
attach ( string $field, mixed &$obj ) : void | Attach document _id reference to an attribute. It will also generate an _id for the document if it's not present. | |
detach ( string $field, mixed &$obj ) : void | Removes a document _id reference from an attribute. It will remove the _id of the given $obj from inside the given $field. | |
embed ( string $field, mixed &$obj ) : void | Embed a new document to an attribute. It will also generate an _id for the document if it's not present. | |
unembed ( string $field, mixed &$obj ) : void | Removes an embedded document from the given field. It does that by using the _id of the given $obj. |
Méthode | Description | |
---|---|---|
embedsMany ( string $entity, string $field ) : |
Return array of embedded documents as objects. | |
embedsOne ( string $entity, string $field ) : Model | null | Return a embedded documents as object. | |
referencesMany ( string $entity, string $field ) : array | Returns the cursor for the referenced documents as objects. | |
referencesOne ( string $entity, string $field ) : mixed | Returns the referenced documents as objects. |
protected embedsMany ( string $entity, string $field ) : |
||
$entity | string | Class of the entity or of the schema of the entity. |
$field | string | Field where the embedded documents are stored. |
Résultat | Array with the embedded documents |