{"action":"closed","issue":{"url":"https://api.github.com/repos/thinkjs/thinkjs/issues/1107","repository_url":"https://api.github.com/repos/thinkjs/thinkjs","labels_url":"https://api.github.com/repos/thinkjs/thinkjs/issues/1107/labels{/name}","comments_url":"https://api.github.com/repos/thinkjs/thinkjs/issues/1107/comments","events_url":"https://api.github.com/repos/thinkjs/thinkjs/issues/1107/events","html_url":"https://github.com/thinkjs/thinkjs/issues/1107","id":305553419,"number":1107,"title":"think-model 一对多模型下当关联模型有新增数据的时候会获取不到值","user":{"login":"biao166","id":1264690,"avatar_url":"https://avatars0.githubusercontent.com/u/1264690?v=4","gravatar_id":"","url":"https://api.github.com/users/biao166","html_url":"https://github.com/biao166","followers_url":"https://api.github.com/users/biao166/followers","following_url":"https://api.github.com/users/biao166/following{/other_user}","gists_url":"https://api.github.com/users/biao166/gists{/gist_id}","starred_url":"https://api.github.com/users/biao166/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biao166/subscriptions","organizations_url":"https://api.github.com/users/biao166/orgs","repos_url":"https://api.github.com/users/biao166/repos","events_url":"https://api.github.com/users/biao166/events{/privacy}","received_events_url":"https://api.github.com/users/biao166/received_events","type":"User","site_admin":false},"labels":[{"id":58350267,"url":"https://api.github.com/repos/thinkjs/thinkjs/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"lizheming","id":424491,"avatar_url":"https://avatars2.githubusercontent.com/u/424491?v=4","gravatar_id":"","url":"https://api.github.com/users/lizheming","html_url":"https://github.com/lizheming","followers_url":"https://api.github.com/users/lizheming/followers","following_url":"https://api.github.com/users/lizheming/following{/other_user}","gists_url":"https://api.github.com/users/lizheming/gists{/gist_id}","starred_url":"https://api.github.com/users/lizheming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizheming/subscriptions","organizations_url":"https://api.github.com/users/lizheming/orgs","repos_url":"https://api.github.com/users/lizheming/repos","events_url":"https://api.github.com/users/lizheming/events{/privacy}","received_events_url":"https://api.github.com/users/lizheming/received_events","type":"User","site_admin":false},"assignees":[{"login":"lizheming","id":424491,"avatar_url":"https://avatars2.githubusercontent.com/u/424491?v=4","gravatar_id":"","url":"https://api.github.com/users/lizheming","html_url":"https://github.com/lizheming","followers_url":"https://api.github.com/users/lizheming/followers","following_url":"https://api.github.com/users/lizheming/following{/other_user}","gists_url":"https://api.github.com/users/lizheming/gists{/gist_id}","starred_url":"https://api.github.com/users/lizheming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizheming/subscriptions","organizations_url":"https://api.github.com/users/lizheming/orgs","repos_url":"https://api.github.com/users/lizheming/repos","events_url":"https://api.github.com/users/lizheming/events{/privacy}","received_events_url":"https://api.github.com/users/lizheming/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-03-15T13:31:24Z","updated_at":"2018-03-20T01:55:56Z","closed_at":"2018-03-20T01:55:56Z","author_association":"NONE","body":"在更新主表的时候 https://github.com/thinkjs/think-model/blob/debc587f54954a911db5688bf2a35de09ebf5f33/src/model.js#L520\r\n\r\n在更新关联表的时候  https://github.com/thinkjs/think-model/blob/debc587f54954a911db5688bf2a35de09ebf5f33/src/relation/has_many.js#L41\r\n\r\n前一个更新将PK已经删除导致更新关联表取不到值 （this.data[this.options.key];）"}}
{"actor":{"display_login":"lizheming"}}