I have a common library used by many of our applications,
Common.DataObjects.dll

In this library, I have defined a NewsItem

In our new calendaring application, I've created a subclass,
CalendarNewsItem, which adds a few properties and methods to NewsItem.
This is in Common.Cal.dll

In this application, all NewsItems are CalendarNewsItems (CNI for
short).

I've got the mapping file for NewsItems in Common.DataObjects.dll and
the mapping file for CNI in Common.Cal.dll, setup like so:


<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="Common.DataObjects" namespace="Common.DataObjects">
        <class name="NewsItem" lazy="false" table="NewsItems" schema="dbo">
                <id name="ID" column="NewsItemID" type="int" unsaved-value="0"
access="nosetter.lowercase-underscore">
                        <generator class="identity"/>
                </id>

                <property name="Headline" type="string" not-null="true" 
length="255"/
>
                <property name="Subhead" type="string" length="255"/>
                <property name="Source" type="string" length="255"/>

                <property name="ExternalUrl" type="string" />
                <property name="ArticleText" type="string" />
                <property name="ContactName" type="string" length="255" />
                <property name="ContactEmail" type="string" length="255" />
                <property name="ContactPhone" type="string" length="255" />
                <property name="ReleaseDate" type="datetime" not-null="true" />
                <property name="ExpirationDate" type="datetime" />

                <!-- Enumeration properties. Always specify enum type. -->
                <property name="SourceType" type="NewsItemSource" />
        </class>

</hibernate-mapping>



<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="Common.Cal" namespace="Common.Cal">
        <union-subclass name="CalendarNewsItem"
extends="Common.DataObjects.NewsItem, Common.DataObjects,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"  lazy="false"
table="NewsItems" schema="dbo">
                <many-to-one name="Calendar" class="Calendar" 
column="CalendarID"
lazy="false" not-null="true" foreign-key="FK_NewsItems_Calendars" />
        </union-subclass>

</hibernate-mapping>


When I try to run, I get this runtime exception:

These classes referenced by 'extends' were not found:
FullName:Common.DataObjects.NewsItem -
Name:Common.DataObjects.NewsItem, Common.DataObjects, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null

What am I missing here? Thanks everyone!

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to