Search code examples
c#.netnhibernatenhibernate-mappingcastle-activerecord

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. However, I'm using Castle ActiveRecord so I don't see how I can apply the same solution, using 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.

Anyone have a way around this?

Thanks, tim


Solution

  • There is boolean flag UseAutoImport passed to constructor of ActiveRecordAttribute. See link http://www.castleproject.org/activerecord/documentation/trunk/manual/attributedocs/Generated_ActiveRecordAttribute.html

    Vij