unlink() public abstract method
Destroys the relationship between two records.
The record with the foreign key of the relationship will be deleted if $delete
is true. Otherwise, the foreign key will be set null
and the record will be saved without validation.
public abstract void unlink ( $name, $model, $delete = false ) | ||
---|---|---|
$name | string |
The case sensitive name of the relationship, e.g. |
$model | static |
The model to be unlinked from the current one. |
$delete | boolean |
Whether to delete the model that contains the foreign key. If false, the model's foreign key will be set |
Please login to continue.