support mongoid > 3