I am trying to pull all my employees with multiple department IDS
Here are my classes:
Class Department
key :name
end
Class Employee
key :department_id
key :name
end
This works:
@employees = Employee.all(:$or => [{:department_id => @
department1.id}, {:department_id => @
department2.id}])
but this does not:
@employees = Employee.all(:$or => [{:department_id => '4fda36b9b3b5bb062e000183'}, {:department_id => '4fda36b9b3b5bb062e000183'}])
How do i find by the ObjectID if i have the number saved as a string?
Thanks,
Steffan