Github user xmpy commented on the pull request:

    https://github.com/apache/metamodel/pull/86#issuecomment-170362357
  
    @kaspersorensen  Thank you for your remarks  :)
    
    I do followings things in these 3 commits.
    1.  remove .classpath
    2.  make mongodb-common module work for both 2.x and 3.x
         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` .
    
    I'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. 
    
    3.  move unclear function convertArrayToList to right place
    This function is used for converting array `[1,3,4]` to List. 
    Here is the problem code in the test 
        ds = 
dataContext.query().from(getCollectionName()).select("id").and("name").where("id").in(2,
 6, 8, 9)
    
    In 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.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to