Here is the setup:

Gemfile:

```
gem 'mongo_mapper', '>= 0.13.0.beta1'
gem 'plucky', '>= 0.6.5'

```

Controller:

```
@job = Job.where(:admin_id => a.id)

```

Rails console output (logger):

```
@job is []

```

One "a.id" value happens to be:

```
a.id is 51ddbd6b972791243d0000f1

```

Mongo Query directly:

```
db.jobs.find({ admin_id: "51ddbd6b972791243d0000f1" })

>>>Lots of stuff<<<

```

How many?

```
> db.jobs.find({ admin_id: "51ddbd6b972791243d0000f1" }).count()
202

```

So - why does this query return results when done direct in Mongo and return an empty array when called from the controller?

More specifically - here is the simple loop:

```
@tech_d = []
    @tech.each do |a|
      Rails.logger.info("a.id is " + a.id)
      @job = Job.where(:admin_id => a.id)
      Rails.logger.info("@job is " + @job.to_a.to_s)

```

Which yields stuff like this:

```
a.id is 51ddbd6b972791243d0000f1
@job is []
a.id is 51f976f2811d830002000adc
@job is []

```

But as I've already proven - there are results to this simple query when done direct in Mongo.

\*\*EDIT - I've tried the GA version of mongo\_mapper gem 0.12.0 and the results are the same (downgraded plucky to 0.5.2 to match - no change)