I have a simple example; a concrete class that inherits an abstract generic class that implements an interface.
ie. StringProperty -> AbstractProperty<T> -> IProperty
I get the following error...
Code:
NHibernate.MappingException: These classes referenced by 'extends' were not found:
NhibernateTest.AbstractGenericProperty`1[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], PromoNhibernateTest
at NHibernate.Cfg.MappingsQueue.CheckNoUnavailableEntries()
at NHibernate.Cfg.Configuration.SecondPassCompile()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
I use NHibernate attributes which produce the following mapping...
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="NhibernateTest.AbstractGenericProperty`1, PromoNhibernateTest" lazy="false" table="Properties">
<id>
<generator class="identity" />
</id>
<discriminator column="Name" type="String" />
</class>
<subclass name="NhibernateTest.StringProperty, PromoNhibernateTest" lazy="false" extends="NhibernateTest.AbstractGenericProperty`1[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], PromoNhibernateTest" discriminator-value="string" />
</hibernate-mapping>
Please advise what is wrong with the mapping.
Thanks,
Ted.