[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] Multiple-database support without needing multiple assemblies for the mappings

2009-03-28 Thread greg.co...@gmail.com
Hi, Using the traditional .hbm NHibernate mapping files I have a very lightweight framework that allows me to handle mappings for multiple databases, without requiring an assembly for each set of mappings. I would like to change this so that I may use the Fluent ClassMap for my mappings without

[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

[fluent-nhib] Replacement for TheColumnNameIs in PropertyMap

2009-03-28 Thread Lars
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 --~--~-~--~~-

[fluent-nhib] Re: Making a reference to a class with a composite ID

2009-03-28 Thread James Gregory
Well your exception says: NHibernate.MappingException: composite-id class must override Equals (): Competency.Domain.AccessibleDocumentsDto On Sat, Mar 28, 2009 at 1:19 PM, nobodybutca wrote: > > James Gregory, > > Nope? that's all of my codes above. > > > On Mar 28, 8:11 pm, James Gregory wrot

[fluent-nhib] Re: Making a reference to a class with a composite ID

2009-03-28 Thread nobodybutca
James Gregory, Nope? that's all of my codes above. On Mar 28, 8:11 pm, James Gregory wrote: > nobodybutca: Have you overridden Equals in your entity? > > On Sat, Mar 28, 2009 at 11:29 AM, nobodybutca wrote: > > > Mine is here: > > > Error is : > > NHibernate.MappingException: composite-id cla

[fluent-nhib] Re: Making a reference to a class with a composite ID

2009-03-28 Thread James Gregory
nobodybutca: Have you overridden Equals in your entity? On Sat, Mar 28, 2009 at 11:29 AM, nobodybutca wrote: > > Mine is here: > > Error is : > NHibernate.MappingException: composite-id class must override Equals > (): Competency.Domain.AccessibleDocumentsDto > NHibernate.MappingException: Could

[fluent-nhib] Re: Making a reference to a class with a composite ID

2009-03-28 Thread nobodybutca
Mine is here: Error is : NHibernate.MappingException: composite-id class must override Equals (): Competency.Domain.AccessibleDocumentsDto NHibernate.MappingException: Could not compile the mapping document: (XmlDocument) public class AccessibleDocumentsDto { public virtual int RoleI