{"action":"created","issue":{"url":"https://api.github.com/repos/apache/metamodel/issues/86","labels_url":"https://api.github.com/repos/apache/metamodel/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/apache/metamodel/issues/86/comments","events_url":"https://api.github.com/repos/apache/metamodel/issues/86/events","html_url":"https://github.com/apache/metamodel/pull/86","id":125564904,"number":86,"title":"METAMODEL-183: Upgrad MongoDB API and seperate MongoDB module into mon…","user":{"login":"xmpy","id":5525388,"avatar_url":"https://avatars.githubusercontent.com/u/5525388?v=3","gravatar_id":"","url":"https://api.github.com/users/xmpy","html_url":"https://github.com/xmpy","followers_url":"https://api.github.com/users/xmpy/followers","following_url":"https://api.github.com/users/xmpy/following{/other_user}","gists_url":"https://api.github.com/users/xmpy/gists{/gist_id}","starred_url":"https://api.github.com/users/xmpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xmpy/subscriptions","organizations_url":"https://api.github.com/users/xmpy/orgs","repos_url":"https://api.github.com/users/xmpy/repos","events_url":"https://api.github.com/users/xmpy/events{/privacy}","received_events_url":"https://api.github.com/users/xmpy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-08T08:25:34Z","updated_at":"2016-01-10T16:04:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/metamodel/pulls/86","html_url":"https://github.com/apache/metamodel/pull/86","diff_url":"https://github.com/apache/metamodel/pull/86.diff","patch_url":"https://github.com/apache/metamodel/pull/86.patch"},"body":"Take over @loorenzooo 's work. Thank you very much.\r\nBesides loorenzooo's work, I also do following works:\r\n1. Seperate the mongo module into mongo2 and mongo3\r\n     This work follows the discussion in this mail: \r\nhttps://mail-archives.apache.org/mod_mbox/metamodel-dev/201511.mbox/%3CCAKXZeCGVSUUNrHYe9Ahbcb_hZ5GH3rNqHBHVUESx4f3DyXDiyQ@mail.gmail.com%3E\r\n\r\n         metamodel\r\n              .......\r\n          |-- mongodb\r\n                 |-- commons\r\n                 |-- mongo2\r\n                 |-- mongo3\r\n2. replace all the DBObject by Document and DBObjectList by List<Document>\r\n3. Enable write concern in mongo3 module\r\n4. close MongoClient to escape warnings"},"comment":{"url":"https://api.github.com/repos/apache/metamodel/issues/comments/170362357","html_url":"https://github.com/apache/metamodel/pull/86#issuecomment-170362357","issue_url":"https://api.github.com/repos/apache/metamodel/issues/86","id":170362357,"user":{"login":"xmpy","id":5525388,"avatar_url":"https://avatars.githubusercontent.com/u/5525388?v=3","gravatar_id":"","url":"https://api.github.com/users/xmpy","html_url":"https://github.com/xmpy","followers_url":"https://api.github.com/users/xmpy/followers","following_url":"https://api.github.com/users/xmpy/following{/other_user}","gists_url":"https://api.github.com/users/xmpy/gists{/gist_id}","starred_url":"https://api.github.com/users/xmpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xmpy/subscriptions","organizations_url":"https://api.github.com/users/xmpy/orgs","repos_url":"https://api.github.com/users/xmpy/repos","events_url":"https://api.github.com/users/xmpy/events{/privacy}","received_events_url":"https://api.github.com/users/xmpy/received_events","type":"User","site_admin":false},"created_at":"2016-01-10T16:04:03Z","updated_at":"2016-01-10T16:04:03Z","body":"@kaspersorensen  Thank you for your remarks  :)\r\n\r\nI do followings things in these 3 commits.\r\n1.  remove .classpath\r\n2.  make mongodb-common module work for both 2.x and 3.x\r\n     Before this commit, we have a `public static Row toRow(Document document, DataSetHeader header)` function in the MongoDBUtils in this common module. However, this `Document`, which is the ` org.bson.Document` is only in the mongodb driver 3.x. So I do a little things to remove functions which contain `Document` .\r\n\r\nI've added 'scoped' in pom. However, I think maybe there is some risk in it. For developer, in the IDE such as Eclipse, Eclipse will still think we using mongodb 3.x, so developer maybe write wrong functions which can not work in both mongodb 2.x and mongodb 3.x. \r\n\r\n3.  move unclear function convertArrayToList to right place\r\nThis function is used for converting array `[1,3,4]` to List. \r\nHere is the problem code in the test \r\n    ds = dataContext.query().from(getCollectionName()).select(\"id\").and(\"name\").where(\"id\").in(2, 6, 8, 9)\r\n\r\nIn the `in` where condition, metamodel will convert `in` parameter to an array object `[2,6,8,9]`. However, in the mongodb 3.x, the query Document class currently supports only List, not support array, like in this bug https://jira.mongodb.org/browse/JAVA-1894.\r\n"}}