Thanks for the reply.
Its seems I can do what I want with a joined-subclass.
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="NH_FF_TestApp.Party, NH-FF-TestApp" table="tblParty874a">
<id name="Wid" column="PartyWID" type="String" length="20">
<generator class="assigned" />
</id>
<property name="MainName"/>
<!--
<property name="Password" column="aPassword" type="String" length="20" />
<property name="EmailAddress" type="String" length="40" />
<property name="LastLogon" type="DateTime" />
-->
</class>
<joined-subclass name="NH_FF_TestApp.ClientJoint, NH-FF-TestApp" extends="NH_FF_TestApp.Party, NH-FF-TestApp"
table="tblClientJoint909">
<key column="WID"/>
<property name="SelfWID" column="SelfWID" type="String" length="20"/>
<property name="Comment"/>
</joined-subclass>
</hibernate-mapping>
I do have another question.
If I try to use the Party object I get an error
Quote:
Unhandled Exception: NHibernate.ADOException: problem in find ---> System.Data.OleDb.OleDbException: IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
Code:
Configuration cfg = new Configuration();
cfg.AddAssembly("NH-FF-TestApp");
NH.ISessionFactory factory = cfg.BuildSessionFactory();
_session = factory.OpenSession();
// IList recentUsers = _session.CreateCriteria(typeof(ClientJoint)).List();
//
// foreach(ClientJoint user in recentUsers)
// {
// Debug.WriteLine(user.Wid);
// }
IList recentUsers = _session.CreateCriteria(typeof(Party)).List();
foreach(Party user in recentUsers)
{
Debug.WriteLine(user.Wid);
}
Should I be able to do this?
Best wishes
Tim