How to efficiently create many documents with Mongoid when one or more violates uniqueness constraint?

前端 未结 0 1037
无人及你
无人及你 2021-01-30 07:32
class User
  include Mongoid::Document

  index({ name: 1 }, { unique: true, name: "name_index" })

To create multiple:

people =         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题