I think that the problem is in the logic.
Currently AutoPersistenceModel:
        1. Checks for mapping overrides
        2. gets the classes that should be mapped and merges with
overrides
        3. applies conventions.

I think that it should
        1. Check for mappings that should be mapped
        2. loop through each mapping and apply any overrides that relate
to the type or its base type
        3. Apply the conventions

What do others think?

-----Original Message-----
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Martin
Hornagold
Sent: 17 April 2009 14:59
To: fluent-nhibernate@googlegroups.com
Subject: [fluent-nhib] Re: AutoMapping overrides for a base type create
class mapping for base tpye


I have just checked and this is a bug. 
Neither AutoMappingOverrideAlteration.Alter or ForTypesThatDeriveFrom do
any checks for IsBaseType (or the new IsConcreteBaseType)
and so will create a class mapping for the base type.
I will try to come up with a patch, although I am not sure that it is
that trivial.


-----Original Message-----
From: fluent-nhibernate@googlegroups.com
[mailto:fluent-nhibern...@googlegroups.com] On Behalf Of Martin
Sent: 17 April 2009 14:42
To: Fluent NHibernate
Subject: [fluent-nhib] AutoMapping overrides for a base type create
class mapping for base tpye


Hi,

I have hit a stumbling block with inheritance and automapping again.
I need to put an override for the mappings of a base type.
But when I do that either through an IAutoMappingOverride or using
ForTypesThatDeriveFrom it tries to create a class mapping for the base
type.
My base type is marked as IsBaseType and so it fails as there is no id
etc..
But in any case I don't want it to create a class mapping for the base
type I just want the mapping overrides applied to the subclasses class
maps.






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@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