Im getting confused here with a one to one mapping. I dont understand why I get a property-ref not found: AddressTypeID in class: AddressType when I can see in the c# code that the property AddressTypeID is definately in the AddressType class.
Setup:
Address table has 1-1 relationship to AddressType table.
f-key in address table to addressTypeID in addressType.
I have only declared the one-to-one relationship in the address.hbm.xml file. Heres what part of my Address mapping file looks like:
Code:
<property name="Postcode" column="postcode" />
<property name="Country" column="country" />
<one-to-one name="AddressTypeID" class = "LicenseManager.BusinessObjects.AddressType, LicenseManager" property-ref="AddressTypeID" />
With the classes the Address object stores a reference to an AddressType object and takes an AddressType in the constructor. The Address object also contains a Property which gets/sets an AddressType. There is no property in the Address class which would set the field it has for f-key integer value it should get from the AddressType class.
I hope someone can give a few clues. Thanks.