讓我描述一下我的用例的抽象,這樣問題的意圖就會清晰。 使用案例: (i). If there is already an object objA of type A, create another obj2A of type
A.
(ii).If there are more than one object of type A, create an object objB of typ
我有一個翻譯文檔嵌入許多翻譯的語言環境文件: class Translation
include Mongoid::Document
field :key, :type => String
embeds_many :locales, :class_name => 'TranslationLocale'
end
class TranslationLocale