{"action":"closed","issue":{"url":"https://api.github.com/repos/top-think/think/issues/284","repository_url":"https://api.github.com/repos/top-think/think","labels_url":"https://api.github.com/repos/top-think/think/issues/284/labels{/name}","comments_url":"https://api.github.com/repos/top-think/think/issues/284/comments","events_url":"https://api.github.com/repos/top-think/think/issues/284/events","html_url":"https://github.com/top-think/think/issues/284","id":131824219,"number":284,"title":"修改模型类中使用addAll方法时，第三个replace参数无效问题","user":{"login":"5ini99","id":14342127,"avatar_url":"https://avatars.githubusercontent.com/u/14342127?v=3","gravatar_id":"","url":"https://api.github.com/users/5ini99","html_url":"https://github.com/5ini99","followers_url":"https://api.github.com/users/5ini99/followers","following_url":"https://api.github.com/users/5ini99/following{/other_user}","gists_url":"https://api.github.com/users/5ini99/gists{/gist_id}","starred_url":"https://api.github.com/users/5ini99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/5ini99/subscriptions","organizations_url":"https://api.github.com/users/5ini99/orgs","repos_url":"https://api.github.com/users/5ini99/repos","events_url":"https://api.github.com/users/5ini99/events{/privacy}","received_events_url":"https://api.github.com/users/5ini99/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/top-think/think/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-06T05:36:33Z","updated_at":"2016-02-09T02:05:46Z","closed_at":"2016-02-09T02:05:46Z","body":"解决方案\r\n文件\r\n`thinkphp/library/think/db/Driver.php`\r\n第950行\r\n`$sql = 'INSERT INTO ' . $this->parseTable($options['table']) . ' (' . implode(',', $fields) . ') ' . implode(' UNION ALL ', $values);`\r\n修改为\r\n`$sql = (true === $replace ? 'REPLACE' : 'INSERT') . ' INTO ' . $this->parseTable($options['table']) . ' (' . implode(',', $fields) . ') ' . implode(' UNION ALL ', $values);`"}}