Mongolid\Model\Relations::unembed PHP Method

unembed() public method

Removes an embedded document from the given field. It does that by using the _id of the given $obj.
public unembed ( string $field, mixed &$obj ) : void
$field string Name of the field where the $obj is embeded.
$obj mixed Document, model instance or _id.
return void
    public function unembed(string $field, &$obj)
    {
        $embedder = Ioc::make(DocumentEmbedder::class);
        $embedder->unembed($this, $field, $obj);
    }