Hi, I'm trying to map a component of type: FormFieldType to a property on type: FormField.
I have two tables in db: FormField and FormFieldType.
mapper.Class<FormField>(map=>map.Component<FormFieldType>(p=>p.FormFieldType, cm=>
{
cm.Property(x => x.FormFieldTypeName, m => m.Column("FORM_FIELD_TYPE_NAME"));
cm.Property(x => x.FieldType, m => m.Column("FIELD_TYPE"));
cm.Property(x => x.Regex, m => m.Column("REGEX"));
}));
When I try to query the FormField table it says that columns: FORM_FIELD_TYPE_NAME, FIELD_TYPE, REGEX
does not exist.
It is because nhibernate thinks that they are part of FormField table. But they are in FormFieldType table.
How to correctly map this?
Please help.