dpicx06888 2016-10-21 10:43
浏览 49
已采纳

Yii2:关系名称是什么?

For the ActiveRecord, what is "the name of the relation" that is to be used in eg. link() and unlink() - where is that defined?

UPDATE: The documentation now includes an example - though it doesn't show exactly how the camel case name is converted - as the answer to this question does.

  • 写回答

1条回答 默认 最新

  • duanpie2414 2016-10-21 10:59
    关注

    If you have got relation set like:

    public function getRelationName()
    

    Relation name is relationName.

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

报告相同问题?