I'm getting invalid selector selector: {"_id"=>{"$in"=>[]}} when trying to query has_many relation between AR and Mongoid. I'm not quite sure I'm using it correctly (although model layout looks just like the docs), here's my setup:
Models
class Sendout < ActiveRecord::Base
include Tenacity
t_has_many :recipients
end
class Recipient
include Mongoid::Document
include Tenacity
t_belongs_to :sendout
end
AR migration
class CreateSendouts < ActiveRecord::Migration
def change
create_table :sendouts do |t|
t.timestamps
end
end
end
Hey,
I'm getting invalid selector
selector: {"_id"=>{"$in"=>[]}}
when trying to query has_many relation between AR and Mongoid. I'm not quite sure I'm using it correctly (although model layout looks just like the docs), here's my setup:Models
AR migration
and finally the behaviour I'm getting
and versions (clean rails app)