[英]Using Castle ActiveRecord, I get an NHibernate DuplicateMappingException when two classes have the same name but different namespaces
The same problem as NHibernate DuplicateMappingException when two classes have the same name but different namespaces . 当两个类具有相同的名称但名称空间不同时,与NHibernate DuplicateMappingException相同的问题。 However, I'm using Castle ActiveRecord so I don't see how I can apply the same solution, using auto-import=false. 但是,我正在使用Castle ActiveRecord,所以我看不到如何使用auto-import = false来应用相同的解决方案。 I dug through the AR code with Reflector but I don't see how I can control the mapping attributes that get generated. 我用Reflector浏览了AR代码,但看不到如何控制生成的映射属性。
Anyone have a way around this? 有人有办法解决吗?
Thanks, tim 蒂姆,谢谢
There is boolean flag UseAutoImport passed to constructor of ActiveRecordAttribute. 布尔标志UseAutoImport传递给ActiveRecordAttribute的构造函数。 See link http://www.castleproject.org/activerecord/documentation/trunk/manual/attributedocs/Generated_ActiveRecordAttribute.html 请参阅链接http://www.castleproject.org/activerecord/documentation/trunk/manual/attributedocs/Generated_ActiveRecordAttribute.html
Vij 维吉
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.