db\BaseActiveRecord unlinkAll()

unlinkAll() public method

Destroys the relationship in current model.

The model with the foreign key of the relationship will be deleted if $delete is true. Otherwise, the foreign key will be set null and the model will be saved without validation.

Note that to destroy the relationship without removing records make sure your keys can be set to null

public void unlinkAll ( $name, $delete = false )
$name string

The case sensitive name of the relationship, e.g. orders for a relation defined via getOrders() method.

$delete boolean

Whether to delete the model that contains the foreign key.

doc_Yii
2016-10-30 16:56:56
Comments
Leave a Comment

Please login to continue.