Open
Description
When nesting Components, the ColumnPrefix is only applied to the first nested Component.
Example Mapping follows:
ClassMap
Component(x => x.Invoice).ColumnPrefix("Invoice");
and
public class InvoiceMap : ComponentMap<Invoice>
{
public InvoiceMap()
{
Map(x => x.Guid);
Component<Text>(x => x.IssueLocation, n =>
{
n.Map(x => x.Content).Column("IssueLocation");
n.Component<Code>(x => x.Language, c =>
{
c.Map(x => x.CodeListGuid).Column("IssueLocationLanguageCodeList");
c.Map(x => x.Content).Column("IssueLocationLanguageContent").Length(2);
});
});
Component<Text>(x => x.AuthenticationLocationName, n =>
{
n.Map(x => x.Content).Column("AuthLocationName");
n.Component<Code>(x => x.Language, c =>
{
c.Map(x => x.CodeListGuid).Column("AuthLocationNameLanguageCodeList");
c.Map(x => x.Content).Column("AuthLocationNameLanguage").Length(2);
});
});
The mapping above will result in database table column names:
InvoiceGuid
InvoiceIssueLocation
InvoiceIssueLocationLanguageCodeList
InvoiceIssueLocationLanguageContent
AuthLocationName
AuthLocationNameLanguageCodeList
AuthLocationNameLanguage
AuthLocationName* should also be prefixed with "Invoice"