Hi
Suppose I have this models:
class Post include Mongoid::Document has_and_belongs_to_many :categories end class Category include Mongoid::Document field :name has_and_belongs_to_many :posts end
After my upgrade to the current commit on 2.2.0-stable branch (I had to upgrade to this version because of the fix of MONGOID-1226), this test failed:
category = Category.create(:name => "MyCategory")
post = Post.new
post.categories = [category, category]
post.save!
post.categories.should == [category]
We got two elements on categories, both with the same id.
Is this expected ?