Yep, Mr. Akridge is correct. Unfortunately the two mapping styles are
entirely disparate currently, something we would like to change but it isn't
happening for a while yet. It's not normally a problem until it comes to
inheritance.

On Thu, Jun 18, 2009 at 1:54 PM, Hudson Akridge <[email protected]>wrote:

> I don't believe this is possible right now, someone might come along to
> correct me however :) That's part of the problem with inheritance
> hierarchies in FNH right now. It's a similar reason to why you can't create
> a separate: ClassMap<BaseClass> then a ClassMap<ConcreteA>,
> ClassMap<ConcreteB> mappings. All inheritance mapping needs to be done
> within one ClassMap (the base class one).
> We're looking to change that, but it'll be a bit.
>
> On Thu, Jun 18, 2009 at 3:14 AM, James Crowley <[email protected]>wrote:
>
>> At the moment I'm using fluent mapping (rather than auto mapping) due to a
>> bunch of legacy tables in my schema.
>>
>> However, I've now got a scenario where I need to map a bunch of classes in
>> an table-per-hierarchy inheritance (with a discriminator column) and ideally
>> I'd like to auto-map these.
>>
>> Is there any way to define the base object (ie "Person") via fluent
>> mapping, but all the inheritance types (ie "Manager") via auto mapping? I've
>> tried this, but Fluent doesn't seem to be able to merge these two mappings.
>> It seems to pick up the base object twice - once from the auto mapping (it's
>> not included in the areas it searches, but is included because they inherit
>> from it) and once from the fluent mapping.
>>
>> Any ideas?
>>
>> Thanks
>>
>> James
>>
>>
>>
>
>
> --
> - 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