Hello,
Using Spring Data MongoDB version : 1.0.2.RELEASE and Spring Data Framework : 3.1.1.RELEASE
I am trying to query for size of an array of embedded documents. I basically have a tree structure with references to parents and children documents.
an example document would be:
I am trying to do the following queryCode:{ "_id" : ObjectId("50099513b760e35d421bab44"), "_class" : "com.example.ExampleClass", "name" : "test1", "parents" : [ ], "children" : [ { "$ref" : "ExampleClass", "$id" : ObjectId("50099516b760e35d421bab45") }, { "$ref" : "ExampleClass", "$id" : ObjectId("50099516b760e35d421bab47") } ] }using the @Query annotation.Code:db.coll.find({parents : {$size : 0}})
Here is my actual custom query in my repository interface
However for no apparent reason, the thread terminates without any exception being thrown.Code:@Query(" { parents : { $size : 0 } }") List<ExampleClass> getAllTopLevelComponents();
Anyone have any ideas what might be causing this ?
Thanks,
Deep


Reply With Quote
