Disable SCI when an inherited model changes its collection name #396

Closed
brianhempel opened this Issue Mar 8, 2012 · 0 comments

1 participant

@brianhempel

From discussion on the mailing list, MongoMapper should disable Single Collection Inheritance when a model sets a new collection name.

class Article
  include MongoMapper::Document
end

class SubArticle < Article
  set_collection_name "sub_articles"
end

SubArticle.collection.name # is currently correct, "sub_articles"
SubArticle.query.to_hash.keys # should be [:transformer], currently is [:transformer, :_type]

Code to negate is in sci.rb#L12-17

@cheald cheald closed this in b6f75e0 Jul 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment