LEFT JOIN in ZF2 using TableGateway

前端 未结 7 1753
无人共我
无人共我 2021-01-03 23:01

I have a table:

*CREATE TABLE IF NOT EXISTS `blogs_settings` (
  `blog_id` int(11) NOT NULL AUTO_INCREMENT,
  `owner_id` int(11) NOT NULL,
  `title` varchar(         


        
7条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-03 23:26

    since the OP hasn't accepted any answer, I'll try to give the solution. I face the same solution as the OP states and the only way to fix it is by adding this line to the model class (in this case this might be 'Blogsetttings.php').

    $this->username= (!empty($data['username'])) ? $data['username'] : null;
    

    you should add above line to the exchangeArray() method. Hope it helps

提交回复
热议问题