def many (name, *args)
      name = name.to_s
      options = args.extract_options!
      type = args.first || name.singularize.classify.constantize
      field = FieldDefinition.new(name, :type => type, :multivalued => true)
      fields[name] = field
      add_json_validations(field, options)
      define_many_json_accessor(field, json_field_name)
    end
def many (name, *args)
      name = name.to_s
      options = args.extract_options!
      type = args.first || name.singularize.classify.constantize
      field = FieldDefinition.new(name, :type => type, :multivalued => true)
      fields[name] = field
      add_json_validations(field, options)
      define_many_json_accessor(field, json_field_name)
    end
Define a multi valued field in the schema.
 The first argument is the field name. This must be unique for the class accross all attributes.

 The optional second argument should be the class of field values. This class must include EmbeddedDocument.
 If it is not specified, the class name will be guessed from the field name.

 The last argument can be :unique => field_name which is used to indicate that the values in the field
 must have unique values in the indicated field name.

 The value of the field will always be an EmbeddedDocumentArray and adding and removing values is as
 simple as appending them to the array. You can also call the build method on the array to keep the syntax the
 same as when dealing with ActiveRecord has_many associations.