【问题标题】:Using Castle ActiveRecord, I get an NHibernate DuplicateMappingException when two classes have the same name but different namespaces使用 Castle ActiveRecord,当两个类名称相同但名称空间不同时,我会收到 NHibernate DuplicateMappingException
【发布时间】:2011-12-07 21:55:31
【问题描述】:

与NHibernate DuplicateMappingException when two classes have the same name but different namespaces 相同的问题。但是,我使用的是 Castle ActiveRecord,所以我看不到如何使用 auto-import=false 应用相同的解决方案。我用 Reflector 挖掘了 AR 代码,但我不知道如何控制生成的映射属性。

谁有办法解决这个问题?

谢谢, 时间

【问题讨论】:

    标签: c# .net nhibernate nhibernate-mapping castle-activerecord


    【解决方案1】:

    有一个布尔标志 UseAutoImport 传递给 ActiveRecordAttribute 的构造函数。见链接http://www.castleproject.org/activerecord/documentation/trunk/manual/attributedocs/Generated_ActiveRecordAttribute.html

    Vij

    【讨论】:

      猜你喜欢
      • 2010-11-12
      • 1970-01-01
      • 1970-01-01
      • 2014-01-12
      • 1970-01-01
      • 2019-12-17
      • 1970-01-01
      • 2011-05-29
      • 1970-01-01
      相关资源
      最近更新 更多