Sha256: fc5126a4648cc589c7449b7b7ca55efed5da002202c7c2f8810a7006f0d24ee5

Contents?: true

Size: 274 Bytes

Versions: 5

Compression:

Stored size: 274 Bytes

Contents

class RootCategory
  include Mongoid::Document
  embeds_many :categories
end

class Category
  include Mongoid::Document
  embedded_in :root_category, :inverse_of => :categories
  embedded_in :category, :inverse_of => :categories
  embeds_many :categories

  field :name
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
mongoid-eager-loading-0.2.0 spec/models/category.rb
mongoid-eager-loading-0.1.2 spec/models/category.rb
mongoid-eager-loading-0.1.1 spec/models/category.rb
mongoid-eager-loading-0.1.0 spec/models/category.rb
mongoid-locomotive-2.0.0.beta9 spec/models/category.rb