duanpuchen3142 2016-04-10 10:28
浏览 30
已采纳

Phalcon,Models,How to Action_on cascade set null?

I'm using phalcon, and I'm trying to make the action on cascade set null all values. Now I have this:

$this->hasOne("folder_id", "Common\Models\Folder", "id", array(
            'alias' => 'Folder',
            'foreignKey' => array(
                'action' => Relation::ACTION_CASCADE
            )
        ));

But that will delete the rows, I just want to set null, not delete.

  • 写回答

1条回答 默认 最新

  • dpj997991 2016-04-26 07:52
    关注

    It can't be done via Phalcon. I had to change my db table relation.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?