Hi,
After setting the IsComponentType:
private void SetupMapping(AutoMappingExpressions s) {
Type[] componentTypes = new Type[] {
typeof(Address)
};
s.IsComponentType = t => componentTypes.Any(x => t == x);
}
I am getting the error below (from the NH itself):
Could not determine type for: Country, for columns:
NHibernate.Mapping.Column(AddressCountry).
Assuming just Person-Address-Country relations.
Here's related component HBM:
<component name="Address" insert="true" update="true">
<property name="Id" type="Int32">
<column name="AddressId" not-null="true" />
</property>
<property name="Line1" type="String">
<column name="AddressLine1" length="50" />
</property>
<property name="Line2" type="String">
<column name="AddressLine2" length="50" />
</property>
<property name="Suburb" type="String">
<column name="AddressSuburb" length="50" />
</property>
<property name="State" type="String">
<column name="AddressState" length="50" />
</property>
<property name="PostCode" type="String">
<column name="AddressPostCode" length="50" />
</property>
<property name="Country" type="Test.Country, Test,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<column name="AddressCountry" />
</property>
</component>
What am I missing here?
Note the AddressId should be ignored in mapping, but that's another
question.
Cheers,
Dmitriy.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" 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/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---