def shard_key_selector
      selector = {}
      shard_key_fields.each do |field|
        selector[field.to_s] = new_record? ? send(field) : attribute_was(field)
      end
      selector
    end
def shard_key_selector
      selector = {}
      shard_key_fields.each do |field|
        selector[field.to_s] = new_record? ? send(field) : attribute_was(field)
      end
      selector
    end
Get the document selector with the defined shard keys.

 @example Get the selector for the shard keys.
   person.shard_key_selector

 @return [ Hash ] The shard key selector.

 @since 2.0.0