mongoid/mongoid — pull request #2697 by kslazarev (2013-01-12 01:07:47+00:00)
Title: Eager_loads two different relations, which classes inherited from another one class.

Maybe it's a bug or a feature. When eager_loads by 'includes' two different relations, which classes inherited from another one class, expect two different objects.

Example:

```ruby
class A
include Mongoid::Document
end

class B < A
belongs_to :d
end

class C < A
belongs_to :d
end

class D
include Mongoid::Document

has_one :b
has_one :c
end

d = D.create
B.create(d: d)
C.create(d: d)

d = D.includes(:b, :c).first
d.b == d.c # true
d.b
# # {
# :_id => "50e5bbf798663904ca000004",
# :_type => "C",
# :d_id => "50e5bbf798663904ca000002"
# }
d.c
# # {
# :_id => "50e5bbf798663904ca000004",
# :_type => "C",
# :d_id => "50e5bbf798663904ca000002"
# }
```

Same behavior with 'has_many' relations.
I would appreciate additions and corrections.