I'm trying to use casbah's fluid querying in find().
My data is like this:
{ "_id" : ObjectId("4d7b26efc58bf2b18f14d9cd"), "srcID" : [ "/m/05zppz" ], "relation" : [ "/location/location/people_born_here" ], "dstID" : [ "/m/06sfnt9" ] }
{ "_id" : ObjectId("4d7b26efc58bf2b19014d9cd"), "srcID" : [ "/m/05zppz" ], "relation" : [ "/location/location/people_born_here" ], "dstID" : [ "/m/06fqp8" ] }
{ "_id" : ObjectId("4d7b26efc58bf2b19114d9cd"), "srcID" : [ "/m/05zppz" ], "relation" : [ "/location/location/people_born_here" ], "dstID" : [ "/m/06_7xfd" ] }
I wrote the following code to query this:
val srcIDs:List[String] = List("/m/05zppz", "/m/06sfnt9")
val query = "srcID" $in srcIDs
the code segment does not compile and reports this error:
error: value $in is not a member of java.lang.String
query = ("srcID" $in srcIDs)
The casbah documentation has the above syntax for $in, but it doesn't seem to work. How to make the $in query work? As a matter of fact, I could not get any fluid query with Casbah's DSL to work and they fail giving the same error msg. Please help!