Module Mongoid::Sharding::ClassMethods
In: lib/mongoid/sharding.rb

Methods

shard_key  

Public Instance methods

Specifies a shard key with the field(s) specified.

@example Specify the shard key.

  class Person
    include Mongoid::Document
    field :first_name, :type => String
    field :last_name, :type => String

    shard_key :first_name, :last_name
  end

@since 2.0.0

[Validate]