{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-ecto/ecto/issues/1727","repository_url":"https://api.github.com/repos/elixir-ecto/ecto","labels_url":"https://api.github.com/repos/elixir-ecto/ecto/issues/1727/labels{/name}","comments_url":"https://api.github.com/repos/elixir-ecto/ecto/issues/1727/comments","events_url":"https://api.github.com/repos/elixir-ecto/ecto/issues/1727/events","html_url":"https://github.com/elixir-ecto/ecto/pull/1727","id":180737238,"number":1727,"title":"Add Ecto.load","user":{"login":"wojtekmach","id":76071,"avatar_url":"https://avatars.githubusercontent.com/u/76071?v=3","gravatar_id":"","url":"https://api.github.com/users/wojtekmach","html_url":"https://github.com/wojtekmach","followers_url":"https://api.github.com/users/wojtekmach/followers","following_url":"https://api.github.com/users/wojtekmach/following{/other_user}","gists_url":"https://api.github.com/users/wojtekmach/gists{/gist_id}","starred_url":"https://api.github.com/users/wojtekmach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojtekmach/subscriptions","organizations_url":"https://api.github.com/users/wojtekmach/orgs","repos_url":"https://api.github.com/users/wojtekmach/repos","events_url":"https://api.github.com/users/wojtekmach/events{/privacy}","received_events_url":"https://api.github.com/users/wojtekmach/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-03T20:23:06Z","updated_at":"2016-10-06T17:34:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elixir-ecto/ecto/pulls/1727","html_url":"https://github.com/elixir-ecto/ecto/pull/1727","diff_url":"https://github.com/elixir-ecto/ecto/pull/1727.diff","patch_url":"https://github.com/elixir-ecto/ecto/pull/1727.patch"},"body":"Closes #1590.\r\n\r\nI figured I'll open up a very early draft to collect some feedback and answer some questions before spending more time on this:\r\n\r\nTODO:\r\n- [x] Support string keys, e.g.: `Ecto.load(Post, %{\"title\" => \"title 1\"})`\r\n- [x] Support atom keys, e.g.: `Ecto.load(Post, %{title: \"title 1\"})`\r\n- [x] Support keyword, e.g.: `Ecto.load(Post, [title: \"title 1\"])`\r\n- [ ] Better error handling (e.g. nicer error messages)?\r\n- [x] Schema-less support? E.g.: `Ecto.load(%{title: :string}, %{title: \"title 1\"})`\r\n- [ ] Better unit tests - what else is worth testing?\r\n- [ ] Typespecs & docs\r\n\r\nMAYBE:\r\n- [ ] Support associations, e.g.: `Ecto.load(Post, %{title: \"title 1\", comments: [%{text: \"text 1\"}]`\r\n- [ ] Support Ecto.load/3, e.g.: `Ecto.load(Post, [\"title\"], [[\"title 1\"], [\"title 2\"]])` - worth keeping? Btw, I don't think association could be supported here.\r\n- [ ] Keep integration test?\r\n\r\nSome of the TODO items are redundant per comments on #1590 but I thought it would be worth repeating them in order to potentially re-consider some features."},"comment":{"url":"https://api.github.com/repos/elixir-ecto/ecto/issues/comments/252033870","html_url":"https://github.com/elixir-ecto/ecto/pull/1727#issuecomment-252033870","issue_url":"https://api.github.com/repos/elixir-ecto/ecto/issues/1727","id":252033870,"user":{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T17:34:30Z","updated_at":"2016-10-06T17:34:30Z","body":"> I already added some tests, but I'm sure more could be added. I definitely need to add docs though!\r\n\r\nGah, sorry again. I meant the docs."}}
{"actor":{"display_login":"josevalim"}}