weixin_39782500 2020-11-22 01:58
浏览 0

:unique and :unique_index merge causes some inconsistencies

For a more complete look, see:

http://gist.github.com/434435

To summarize briefly:

If the @:unique@ option is used on more than one properties, the unique indicies created in the database and the validations created are either 1. Inconsistent with each other 2. Result in redundant queries being issued and/or redundant indicies being created

Created by Jonathan Stott (namelessjon) - 2010-06-11 13:18:17 UTC

Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/1316

该提问来源于开源项目:datamapper/dm-core

  • 写回答

11条回答 默认 最新

  • weixin_39782500 2020-11-22 01:58
    关注

    : I’m going to have to look at this in more detail, but I should note that the value for :unique has nothing to do with he property names. It’s the name of the unique index you want the property to belong to.

    by Dan Kubb (dkubb)

    评论

报告相同问题?