{"action":"created","issue":{"url":"https://api.github.com/repos/benoitc/couchbeam/issues/124","labels_url":"https://api.github.com/repos/benoitc/couchbeam/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/benoitc/couchbeam/issues/124/comments","events_url":"https://api.github.com/repos/benoitc/couchbeam/issues/124/events","html_url":"https://github.com/benoitc/couchbeam/issues/124","id":53229640,"number":124,"title":"`couchbeam:doc_exists/2` returns the wrong value.","user":{"login":"iambumblehead","id":2058705,"avatar_url":"https://avatars.githubusercontent.com/u/2058705?v=3","gravatar_id":"","url":"https://api.github.com/users/iambumblehead","html_url":"https://github.com/iambumblehead","followers_url":"https://api.github.com/users/iambumblehead/followers","following_url":"https://api.github.com/users/iambumblehead/following{/other_user}","gists_url":"https://api.github.com/users/iambumblehead/gists{/gist_id}","starred_url":"https://api.github.com/users/iambumblehead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iambumblehead/subscriptions","organizations_url":"https://api.github.com/users/iambumblehead/orgs","repos_url":"https://api.github.com/users/iambumblehead/repos","events_url":"https://api.github.com/users/iambumblehead/events{/privacy}","received_events_url":"https://api.github.com/users/iambumblehead/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/benoitc/couchbeam/labels/Feedback%20needed","name":"Feedback needed","color":"ffa008"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-01T21:52:05Z","updated_at":"2015-03-11T21:23:40Z","closed_at":null,"body":"`couchbeam:doc_exists/2` returns the wrong value.\r\n\r\nI encounter this in any recently tagged branch (I recently upgraded from version 1.0.7 [I think] and did not have this problem there). I will try 1.1.6 now and let you know the result.\r\n\r\nOf course if I try to create the design doc (again) couchbeam returns an error, `{error,conflict}`\r\n\r\n```erl\r\n%% open the design doc, see that it exists.\r\nUrl = \"http://localhost:5984\",\r\nAuth = [{basic_auth,{<<\"jumpyday\">>,<<\"glo9go99!goB\">>}}],\r\nServer = couchbeam:server_connection(Url, Auth),\r\nOptions = [],\r\n{ok, Db} = couchbeam:open_db(Server, \"user-test\"),\r\nDocName = <<\"_design/testuser\">>,\r\ncouchbeam:open_doc(Db, DocName).\r\n%% {ok,{[{<<\"_id\">>,<<\"_design/testuser\">>},\r\n%%       {<<\"_rev\">>,<<\"1-17d95a6f5b71dff90129febc7dc5fb7b\">>},\r\n%%       {<<\"language\">>,<<\"javascript\">>},\r\n%%       {<<\"views\">>,\r\n%%        {[{<<\"test\">>,\r\n%%           {[{<<\"map\">>,\r\n%%              <<\"function (doc) {\\n if (doc.type == \\\"test\\\") {\\n emi\"...>>}]}},\r\n%%          {<<\"test2\">>,\r\n%%           {[{<<\"map\">>,\r\n%%              <<\"function (doc) {\\n if (doc.type == \\\"test2\\\") {\"...>>}]}},\r\n%%          {<<\"user_name\">>,\r\n%%           {[{<<\"map\">>,\r\n%%              <<\"function (doc) { if (doc.name) emit(doc.\"...>>}]}}]}}]}}\r\n%%\r\n%%\r\n%% now try using doc_exists/2 -it returns false :(\r\ncouchbeam:doc_exists(Db, DocName).\r\n%% false\r\n```\r\n------------------------------------------------\r\nI also see this problem using couchbeam:db_exists/2 but am able to use couchbeam:open_or_create_db/2 in the place of db_exists/2. There is no equivalent open_or_create function for design docs."},"comment":{"url":"https://api.github.com/repos/benoitc/couchbeam/issues/comments/78374965","html_url":"https://github.com/benoitc/couchbeam/issues/124#issuecomment-78374965","issue_url":"https://api.github.com/repos/benoitc/couchbeam/issues/124","id":78374965,"user":{"login":"benoitc","id":14498,"avatar_url":"https://avatars.githubusercontent.com/u/14498?v=3","gravatar_id":"","url":"https://api.github.com/users/benoitc","html_url":"https://github.com/benoitc","followers_url":"https://api.github.com/users/benoitc/followers","following_url":"https://api.github.com/users/benoitc/following{/other_user}","gists_url":"https://api.github.com/users/benoitc/gists{/gist_id}","starred_url":"https://api.github.com/users/benoitc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoitc/subscriptions","organizations_url":"https://api.github.com/users/benoitc/orgs","repos_url":"https://api.github.com/users/benoitc/repos","events_url":"https://api.github.com/users/benoitc/events{/privacy}","received_events_url":"https://api.github.com/users/benoitc/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T21:23:40Z","updated_at":"2015-03-11T21:23:40Z","body":"it should be `-pa ebin -pa deps/*/ebin`, note the double `-pa`. Hope it helps. So far I can't reproduce it there."}}