So, if I understand you correctly. You're creating a base mapping to ship
with your application, and you'll have customers extend the columns in a
table in the database that use with your application, depending on their
needs? So you want to ship out a complete application, that they can
essentially create an override to use?
At a guess, you might try creating a mapping of your class something like
this:

public class BaseClassMapping : ClassMap<BaseClass>
{

public BaseClassMapping()
{

PotentiallyOverridableMappingMethod();

}

public virtual void PotentiallyOverridableMappingMethod()
{

...DefaultmappingImplementation...

}

}

They'd then create a new mapping class in their assembly which would have a
ctor that called the base ctor only, then override the default mapping (and
possibly call it as the base() implementation if they simply wanted to add
onto the original mapping).

Then you'd probably have to create/extend your own Configuration Helper for
your library, where they could register another class/assembly for use.
You'd then tell the configuration utility in FNH to ignore the base
implementation, and through reflection, point it at the user implementation
instead. This would require you getting into and understanding how the FNH
configuration class works.

There might be a simpler way to do this, but this is all I can come up with
at the moment :)

On Wed, Jun 17, 2009 at 9:29 AM, Marco <[email protected]> wrote:

>
> I'm using the manual Mapping to setup a base mapping. Some of my
> customers have more or less fields in the database and i want to
> create override the default mapping. Is it possible to load the
> default mapping? Scan other assemblies for some interface / class.
> That class can override the default mapping for some types..
>
> Possible? if so hints / tips are welcome!
>
> Marco
> >
>


-- 
- Hudson
http://www.bestguesstheory.com
http://twitter.com/HudsonAkridge

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

Reply via email to