i have a model Bussimess
here is the relation in Business model
im using
to load the image of a particular business.
how i delete a particular image using this relation.
is it possible to delete like this??
thanks
here is the relation in Business model
'images' => array(self::HAS_MANY, 'BusinessImages','business_id'),
im using
$model=Business::model()->with('images')->findByPk($'id');
$model->image;to load the image of a particular business.
how i delete a particular image using this relation.
is it possible to delete like this??
$model->image->delete().
thanks