src/Model/Service/SqlService.php
public function unlink($relation, $primary1, $primary2)
    {
        if (is_null($this->schema)) {
            throw SystemException::forNoSchema();
        }

        $name = $this->schema->getName();
        $relations = $this->schema->getRelations();
        $table = $name . '_' . $relation;

        if (!isset($relations[$table])) {
            throw SystemException::forNoRelation($name, $relation);
        }

        $relation = $relations[$table];

        $model = $this->resource->model();
        $model[$relation['primary1']] = $primary1;
        $model[$relation['primary2']] = $primary2;

        return $model->remove($table);
    }
public function unlink($relation, $primary1, $primary2)
    {
        if (is_null($this->schema)) {
            throw SystemException::forNoSchema();
        }

        $name = $this->schema->getName();
        $relations = $this->schema->getRelations();
        $table = $name . '_' . $relation;

        if (!isset($relations[$table])) {
            throw SystemException::forNoRelation($name, $relation);
        }

        $relation = $relations[$table];

        $model = $this->resource->model();
        $model[$relation['primary1']] = $primary1;
        $model[$relation['primary2']] = $primary2;

        return $model->remove($table);
    }
public function unlink ( $ relation , $ primary1 , $ primary2 ) { if ( is_null ( $ this -> schema ) ) { throw SystemException :: forNoSchema ( ) ; } $ name = $ this -> schema -> getName ( ) ; $ relations = $ this -> schema -> getRelations ( ) ; $ table = $ name . '_' . $ relation ; if ( ! isset ( $ relations [ $ table ] ) ) { throw SystemException :: forNoRelation ( $ name , $ relation ) ; } $ relation = $ relations [ $ table ] ; $ model = $ this -> resource -> model ( ) ; $ model [ $ relation [ 'primary1' ] ] = $ primary1 ; $ model [ $ relation [ 'primary2' ] ] = $ primary2 ; return $ model -> remove ( $ table ) ; }
Unlinks table to another table

@param *string $relation
@param *int    $primary1
@param *int    $primary2

@return array
Unlinks table to another table