当我在 Rails 控制台中运行此查询时:
1.9.3p286 :118 > cs = Conference.any_of({:schedule_cache => { :$elemMatch => { :start_date.gte => Date.parse('7 Mar 2013'), :end_date.lte => Date.parse('8 Mar 2013')}}})
1.9.3p286 :118 > cs.count
我得到:
TypeError: keys must be strings or symbols