fluent-nhibernate
fluent-nhibernate copied to clipboard
ColumnPrefix only applied to first Component mapping inside a ComponentMap
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"
Ok, let me look into that. What version are you using? Is it 1.4.0.0 from NuGet?
I am using 1.3.0.733 from NuGet.
Thanks.
On 25 February 2014 11:07, Gleb Chermennov [email protected] wrote:
Ok, let me look into that. What version are you using? Is it 1.4.0.0 from NuGet?
— Reply to this email directly or view it on GitHubhttps://github.com/jagregory/fluent-nhibernate/issues/261#issuecomment-35987961 .
I have the same issue in versions 1.3.0.733 and 1.4.0.0