top-think / think-orm

Think ORM——the PHP Database&ORM Framework
Apache License 2.0
413 stars 171 forks source link

一对一关联时,关联的key获取不准确 #492

Closed idcpj closed 1 year ago

idcpj commented 1 year ago

如果model 采用 驼峰写法

    public function screenOrder(){
        return $this->hasOne(ScreenOrder::class,"screen_order_id","screen_order_id");
    }

使用一对一关联时,获取到了转为小写的map的key(screenorder),应该以model中的方法为准比较好(screenOrder)