{"action":"created","issue":{"url":"https://api.github.com/repos/tgriesser/bookshelf/issues/1380","repository_url":"https://api.github.com/repos/tgriesser/bookshelf","labels_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/1380/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/1380/comments","events_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/1380/events","html_url":"https://github.com/tgriesser/bookshelf/pull/1380","id":177009231,"number":1380,"title":"Fix #1159 by formating attributes","user":{"login":"TinOo512","id":3052637,"avatar_url":"https://avatars.githubusercontent.com/u/3052637?v=3","gravatar_id":"","url":"https://api.github.com/users/TinOo512","html_url":"https://github.com/TinOo512","followers_url":"https://api.github.com/users/TinOo512/followers","following_url":"https://api.github.com/users/TinOo512/following{/other_user}","gists_url":"https://api.github.com/users/TinOo512/gists{/gist_id}","starred_url":"https://api.github.com/users/TinOo512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TinOo512/subscriptions","organizations_url":"https://api.github.com/users/TinOo512/orgs","repos_url":"https://api.github.com/users/TinOo512/repos","events_url":"https://api.github.com/users/TinOo512/events{/privacy}","received_events_url":"https://api.github.com/users/TinOo512/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tgriesser/bookshelf/labels/applicable","name":"applicable","color":"0052cc"},{"url":"https://api.github.com/repos/tgriesser/bookshelf/labels/weak/no%20tests","name":"weak/no tests","color":"b60205"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-14T20:16:57Z","updated_at":"2016-09-29T13:07:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tgriesser/bookshelf/pulls/1380","html_url":"https://github.com/tgriesser/bookshelf/pull/1380","diff_url":"https://github.com/tgriesser/bookshelf/pull/1380.diff","patch_url":"https://github.com/tgriesser/bookshelf/pull/1380.patch"},"body":"If `this.parent` contains the same models it might be more efficient to use the `parse` method on `typeColumn` and `idColumn` instead.  I don't know enough the codebase to find the answer by myself. But at least this fix the bug.\r\n\r\nLet me know what do you think.\r\n\r\nSolves [#1159](https://github.com/tgriesser/bookshelf/issues/1159)"},"comment":{"url":"https://api.github.com/repos/tgriesser/bookshelf/issues/comments/250460625","html_url":"https://github.com/tgriesser/bookshelf/pull/1380#issuecomment-250460625","issue_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/1380","id":250460625,"user":{"login":"TinOo512","id":3052637,"avatar_url":"https://avatars.githubusercontent.com/u/3052637?v=3","gravatar_id":"","url":"https://api.github.com/users/TinOo512","html_url":"https://github.com/TinOo512","followers_url":"https://api.github.com/users/TinOo512/followers","following_url":"https://api.github.com/users/TinOo512/following{/other_user}","gists_url":"https://api.github.com/users/TinOo512/gists{/gist_id}","starred_url":"https://api.github.com/users/TinOo512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TinOo512/subscriptions","organizations_url":"https://api.github.com/users/TinOo512/orgs","repos_url":"https://api.github.com/users/TinOo512/repos","events_url":"https://api.github.com/users/TinOo512/events{/privacy}","received_events_url":"https://api.github.com/users/TinOo512/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T13:07:27Z","updated_at":"2016-09-29T13:07:27Z","body":"@vellotis Just to be clear `morphTo`, `morphMany` and `morphOne` never worked before when you override the `format` and `parse` method of the model. Il added 3 tests to cover those relations behind a parsed model.\r\n\r\nOnly 2 tests are passing with the fix (those using `morphTo`). But the one using `morphMany` isn't, ... \r\n\r\nI agree it should be better to also fix the test which cover `morphMany` but I don't have any clue of what's happening here, ... Any idea where I should look into ?"}}
{"actor":{"display_login":"TinOo512"}}