[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-30 Thread Martin Hornagold
nhibernate@googlegroups.com Subject: [fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap Martin: It wouldn't, it's the lack of the collection that affects the conventions. We used to have two methods ColumnName, and ColumnNames, both were cumulative and resulted in

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-30 Thread James Gregory
s.com [mailto: > fluent-nhibern...@googlegroups.com] *On Behalf Of *James Gregory > *Sent:* 30 March 2009 17:29 > *To:* fluent-nhibernate@googlegroups.com > *Subject:* [fluent-nhib] Re: Replacement for TheColumnNameIs in > PropertyMap > > > > I think the way to go for this is

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-30 Thread Martin Hornagold
ections in a method would affect the conventions though From: fluent-nhibernate@googlegroups.com [mailto:fluent-nhibern...@googlegroups.com] On Behalf Of James Gregory Sent: 30 March 2009 17:29 To: fluent-nhibernate@googlegroups.com Subject: [fluent-nhib] Re: Replacement for TheColumnNameIs in P

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-30 Thread James Gregory
I think the way to go for this is to follow Jon's suggestion of having a single parameter method that can be used for if there's only one column, and the (currently available) collection property for use when you need to have more than one column, or if you need to modify or interrogate the collect

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-30 Thread James Gregory
Again, we had this previously and it suffers from the problem of not being able to interrogate or modify the collection at convention time. On Mon, Mar 30, 2009 at 4:06 PM, Paul Yoder wrote: > What about using a params string array in the method parameter to support > single and multiple column

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-30 Thread Paul Yoder
What about using a params string array in the method parameter to support single and multiple column names? So instead of Map(x => x.BusinessName).ColumnNames(c => { c.AddColumn("FirmCol1"); c.AddColumn("FirmCol2"); } it could be Map(x => x.BusinessName).ColumnNames("FirmCol1", "FirmCol2");

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-30 Thread Paul Batum
You said it yourself, its not so fluent. This approach reduces the readability of the code. On Mon, Mar 30, 2009 at 9:52 PM, NiHique wrote: > > What about: Map(x => x.BusinessName, "FirmName"); > > It is shorter and works pretty well, also with Identity ok, not so > fluent but still pretty s

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-30 Thread NiHique
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 wrote: > I'm ok with that... :) > > On 3/29/09, Jon Kruger wrote: > > > Right, but couldn't you

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-29 Thread James Gregory
I'm ok with that... :) On 3/29/09, Jon Kruger 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

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-28 Thread Jon Kruger
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 wrote: > Yep, that's how it used to be

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-28 Thread James Gregory
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 wrote: > Hi Lars, > > It looks like its been changed to sup

[fluent-nhib] Re: Replacement for TheColumnNameIs in PropertyMap

2009-03-28 Thread Paul Batum
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 lam