What about: Map(x => x.BusinessName, "FirmName");

It is shorter and works pretty well, also with Identity.... ok, not so
fluent but still pretty straightforward;)

On Mar 29, 11:15 am, James Gregory <[email protected]> wrote:
> I'm ok with that... :)
>
> On 3/29/09, Jon Kruger <[email protected]> wrote:
>
> > Right, but couldn't you have ...
>
> > Map(x => x.BusinessName).ColumnName("FirmName");
>
> > ... which internally just calls ...
>
> > ColumnNames.Clear();
> > ColumnNames.Add("FirmName");
>
> > That way everyone could have their way.
>
> > On Sat, Mar 28, 2009 at 8:59 PM, James Gregory
> > <[email protected]>wrote:
>
> >> Yep, that's how it used to be but there was no easy way to handle clearing
> >> and counting of columns for conventional support without adding all the
> >> methods directly to the property map itself.
>
> >> On Sat, Mar 28, 2009 at 11:00 PM, Paul Batum <[email protected]> wrote:
>
> >>> Hi Lars,
>
> >>> It looks like its been changed to support multiple columns. For now, this
> >>> should work:
>
> >>>   Map(x => x.BusinessName).ColumnNames.Add("FirmName")
>
> >>> I'm not sure if I like this change. James, did you consider achieving
> >>> this
> >>> with two methods, one that takes a string and another that takes a lambda
> >>> with which you can specify multiple columns? I'm thinking something like:
>
> >>> Map(x => x.BusinessName).ColumnName("FirmName");
>
> >>> and
>
> >>> Map(x => x.BusinessName).ColumnNames(c =>
> >>> {
> >>>   c.AddColumn("FirmCol1");
> >>>   c.AddColumn("FirmCol2");
> >>> }
>
> >>> Thoughts?
>
> >>> On Sun, Mar 29, 2009 at 9:39 AM, Lars <[email protected]> wrote:
>
> >>>> I see that TheColumnNameIs has been replaced with ColumnName in
> >>>> IIdentityPart, but I can't figure out what it was changed to in
> >>>> PropertyMap.
>
> >>>> The Map statement is:
>
> >>>>            Map(x => x.BusinessName).TheColumnNameIs("FirmName");
>
> >>>> But this no longer works.
>
> >>>> Thanks, Lars
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to