哈哈,here you again;
thanks , i have done it in that way
i just thought there may be some straight way like count method.
> 2012/4/27 lemon <
huwei1...@gmail.com>:
>
>
>
>
>
>
>
>
>
> > here is my doc:
> > {"NAME" : "tom1", "CAR" : { "$ref" : "car ", "$id" :
> > ObjectId("4f9a0ee69a7224f86f74cc2d") } }
> > etc.... and ref there is follow:
> > { "_id" : ObjectId("4f9a0ee69a7224f86f74cc2c"), "PRODUCER" : "benc" }
> > so if i want to know
> > 1; how many people have a benc car
> > 2; how many ref there is ,by the way ,how many producer there, like
> > distinct CAR.$id, but something like it didnot work
> > i can do it in Embedded way,but dont know how to do it in ref way in
> > java.
> > plz help
>
> > --
> > You received this message because you are subscribed to the Google Groups "mongodb-user" group.> To post to this group, send email
tomongo...@googlegroups.com.> To unsubscribe from this group, send email
tomongodb-use...@googlegroups.com.