【问题标题】:Nhibernate, how to make unique string columnNhibernate,如何制作唯一的字符串列
【发布时间】:2013-05-09 08:27:41
【问题描述】:

我有带有 Id、FkAnotherObject 和字符串的示例“对象”。我必须使用哪个属性才能在表中拥有唯一的字符串。有什么选择吗?

【问题讨论】:

    标签: string nhibernate unique


    【解决方案1】:

    unique="true" 应该可以解决问题 :-)

    或者,unique-key 允许您创建多列唯一约束。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-12
      • 1970-01-01
      • 2012-05-11
      • 1970-01-01
      相关资源
      最近更新 更多