I have an NHibernate mapping that makes use of a <database-object> element that makes use of a definition class. The mapping looks a bit like this:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="Foo" assembly="Foo">
<database-object>
<definition class="Foo.AuxilliaryData,Foo"/>
</database-object>
</hibernate-mapping>
This works fine, but I would like to use mapping by code as per NHibernate >=3.2. Is there a way to do this?
(Out of interest, my reason for wanting to convert this is so that R# “Find usages” will work for the AuxilliaryData class. At the moment R# (and any other code inspection tool) thinks that this class is unused).
just add it when generating the Configuration object