[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-04-16 Thread Berryl Hesh
Keep up the nice work Felipe. Thanks! On Apr 15, 5:09 am, Felipe Leusin wrote: > Just one more quick add-in, the code I changed is this > (AutoMapper.cs : Lin 71): > > if (isDiscriminated && !discriminatorSet && mapping is ClassMapping) >                 { >                     if (((ClassMapping

[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-04-15 Thread Felipe Leusin
Just one more quick add-in, the code I changed is this (AutoMapper.cs : Lin 71): if (isDiscriminated && !discriminatorSet && mapping is ClassMapping) { if (((ClassMapping)mapping).Discriminator != null) { discriminatorSet = true;

[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-04-15 Thread Felipe Leusin
Just a heads up, after some further digging up I found some inconsistencies in AutoMapper.cs method MapInheritanceTree, there is no check to see if mappings.Discriminator is set whatsoever. Now, if I add something simple as: if (((ClassMapping)mapping).Discriminator != null) {

[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-04-14 Thread Berryl Hesh
I find the same behavior too - I can't set the column name of the discriminator and I can't override the default behavior of using the fully qualified type as the discriminator value. I posted a question here a few weeks ago looking for a way to see if there was a convention I could use and how to

[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-04-14 Thread Felipe Leusin
A follow-up: If u set the DiscriminatorColumn in the setup part of AutoMapper you can change the name of the column, ie: DiscriminatorColumn = type => (type == typeof(MyClass)) ? "IsHomeTeam" : "discriminator"; But I've been having no luck in determining a way to set DiscriminatorColumn type and

[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-04-13 Thread reach4thelasers
I've been searching for a solution to this all day. Does anyone have a solution? On Mar 22, 7:06 pm, kberridge wrote: > Last check, can anyone provide any direction for me on this? > > Thanks, > Kevin > > On Mar 9, 6:37 pm, kberridge wrote: > > > > > Hi, > > I'm looking for an example of how to

[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-04-11 Thread Felipe Leusin
Same problem here... probably gonna simply disable AutoMapping for those classes. On Mar 22, 3:06 pm, kberridge wrote: > Last check, can anyone provide any direction for me on this? > > Thanks, > Kevin > > On Mar 9, 6:37 pm, kberridge wrote: > > > Hi, > > I'm looking for an example of how to use

[fluent-nhib] Re: Automappings and table-per-class-hierarchy

2010-03-22 Thread kberridge
Last check, can anyone provide any direction for me on this? Thanks, Kevin On Mar 9, 6:37 pm, kberridge wrote: > Hi, > I'm looking for an example of how to use a table-per-class-hierarchies > with Automapper. > > I've setup my automappings so the default Subclass Strategy is > Subclass: > autoMa