{"action":"created","issue":{"url":"https://api.github.com/repos/hamiltop/rethinkdb-elixir/issues/115","repository_url":"https://api.github.com/repos/hamiltop/rethinkdb-elixir","labels_url":"https://api.github.com/repos/hamiltop/rethinkdb-elixir/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/hamiltop/rethinkdb-elixir/issues/115/comments","events_url":"https://api.github.com/repos/hamiltop/rethinkdb-elixir/issues/115/events","html_url":"https://github.com/hamiltop/rethinkdb-elixir/issues/115","id":186176969,"number":115,"title":"Map types merge instead of update","user":{"login":"ijcd","id":12153,"avatar_url":"https://avatars.githubusercontent.com/u/12153?v=3","gravatar_id":"","url":"https://api.github.com/users/ijcd","html_url":"https://github.com/ijcd","followers_url":"https://api.github.com/users/ijcd/followers","following_url":"https://api.github.com/users/ijcd/following{/other_user}","gists_url":"https://api.github.com/users/ijcd/gists{/gist_id}","starred_url":"https://api.github.com/users/ijcd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijcd/subscriptions","organizations_url":"https://api.github.com/users/ijcd/orgs","repos_url":"https://api.github.com/users/ijcd/repos","events_url":"https://api.github.com/users/ijcd/events{/privacy}","received_events_url":"https://api.github.com/users/ijcd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-31T00:30:58Z","updated_at":"2016-10-31T08:35:04Z","closed_at":null,"body":"I'm working on the integration tests for rethinkdb_ecto and this test is failing:\n\n```\n  @tag :map_type\n  test \"map type on update\" do\n    post = TestRepo.insert!(%Post{meta: %{\"world\" => \"hello\"}})\n    assert TestRepo.get!(Post, post.id).meta == %{\"world\" => \"hello\"}\n\n    post = TestRepo.update!(Ecto.Changeset.change post, meta: %{hello: \"world\"})\n    assert TestRepo.get!(Post, post.id).meta == %{\"hello\" => \"world\"}\n\n    query = from(p in Post, where: p.id == ^post.id)\n    TestRepo.update_all(query, set: [meta: %{world: \"hello\"}])\n    assert TestRepo.get!(Post, post.id).meta == %{\"world\" => \"hello\"}\n  end\n```\n\nThe middle assertion is failing, because it looks like a merge is happening instead of an update. It seems that Ecto believes this should be a merge. Is this specified differently in rethinkdb-elixir  or is this just not tested or underspecified?\n\n```\n  1) test map type on update (Ecto.Integration.TypeTest)\n     deps/ecto/integration_test/cases/type.exs:163\n     Assertion with == failed\n     code: TestRepo.get!(Post, post.id()).meta() == %{\"hello\" => \"world\"}\n     lhs:  %{\"hello\" => \"world\", \"world\" => \"hello\"}\n     rhs:  %{\"hello\" => \"world\"}\n     stacktrace:\n       deps/ecto/integration_test/cases/type.exs:170: (test)\n```\n"},"comment":{"url":"https://api.github.com/repos/hamiltop/rethinkdb-elixir/issues/comments/257238912","html_url":"https://github.com/hamiltop/rethinkdb-elixir/issues/115#issuecomment-257238912","issue_url":"https://api.github.com/repos/hamiltop/rethinkdb-elixir/issues/115","id":257238912,"user":{"login":"hamiltop","id":354848,"avatar_url":"https://avatars.githubusercontent.com/u/354848?v=3","gravatar_id":"","url":"https://api.github.com/users/hamiltop","html_url":"https://github.com/hamiltop","followers_url":"https://api.github.com/users/hamiltop/followers","following_url":"https://api.github.com/users/hamiltop/following{/other_user}","gists_url":"https://api.github.com/users/hamiltop/gists{/gist_id}","starred_url":"https://api.github.com/users/hamiltop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamiltop/subscriptions","organizations_url":"https://api.github.com/users/hamiltop/orgs","repos_url":"https://api.github.com/users/hamiltop/repos","events_url":"https://api.github.com/users/hamiltop/events{/privacy}","received_events_url":"https://api.github.com/users/hamiltop/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T08:35:04Z","updated_at":"2016-10-31T08:35:04Z","body":"I think you have the correct information. This is one of the reasons I'm not terribly fond of Ecto for RethinkDB. It just provides a layer for impedence mismatch. ReQL already has semantics for querying and updating and Ecto in this case is causing confusion around update semantics."}}
{"actor":{"display_login":"hamiltop"}}