Mongodb – Rails Mongoid has_many query not using foreign_key
I am using mongodb for first time. I have below models class Legacy::User include Mongoid::Document has_many :customers field :username, type: String end class Legacy::Customer include Mongoid::Document belongs_to :user field :user_id, type: String end When I run below query it doesn't…