Last check, can anyone provide any direction for me on this?

Thanks,
Kevin

On Mar 9, 6:37 pm, kberridge <kevin.w.berri...@gmail.com> 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:
> autoMappings.Setup( s => s.SubclassStrategy = t =>
> SubclassStrategy.Subclass );
>
> I've included the parent of the class Hierarchy with:
> autoMappings.IncludeBase<Parent>();
>
> I have also defined an IAutoMappingOverride for the Parent:
> public class ParentOverrideMap : IAutoMappingOverride<Parent>
> {
>   public void
> Override( FluentNHibernate.Automapping.AutoMapping<Parent> mapping )
>   {
>     mapping.DiscriminateSubClassesOnColumn( "Type" );
>     mapping.SubClass<ChildA>( "ChildA" );
>   }
>
> }
>
> From what I've read on the Wiki on in various Google searches it seems
> like that should work, but when I test it by using the SchemaExport
> tool, it builds the table with the discriminator column name as
> "discriminator" instead of "Type".  So it seems my overrides aren't
> working.
>
> The documentation on the Wiki doesn't cover this, so I've mostly been
> guessing, that's why I'm wondering if anyone could point me to an
> article somewhere with a good example of using the table-per-class-
> hierarchy strategy with automappings.
>
> Thanks,
> Kevin

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibern...@googlegroups.com.
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to