【发布时间】:2013-05-09 08:27:41
【问题描述】:
我有带有 Id、FkAnotherObject 和字符串的示例“对象”。我必须使用哪个属性才能在表中拥有唯一的字符串。有什么选择吗?
【问题讨论】:
标签: string nhibernate unique
我有带有 Id、FkAnotherObject 和字符串的示例“对象”。我必须使用哪个属性才能在表中拥有唯一的字符串。有什么选择吗?
【问题讨论】:
标签: string nhibernate unique
unique="true" 应该可以解决问题 :-)
或者,unique-key 允许您创建多列唯一约束。
【讨论】: