On February 27, 2016 9:23:10 PM EST, Michael Powell <mwpowell...@gmail.com> 
wrote:
>On Sat, Feb 27, 2016 at 6:33 PM, Michael Powell <mwpowell...@gmail.com>
>wrote:
>> On Sat, Feb 27, 2016 at 6:28 PM, Michael Powell
><mwpowell...@gmail.com> wrote:
>>> Hello,
>>>
>>> I have a situation something like this:
>
>Well, I figured out one part of what was going one. I had recently
>refactored one of the "hooks" I was using for identifying assemblies
>in which fluent mappings were happening. Resolved that one.
>
>Still, however, am faced with a non-trivial subclass map issue, B
>connected to A, C connected to B. It seems like Fluent and/or
>NHibernate want the subclass to be at most two levels deep, but I
>could be wrong.

After giving it some thought, I think it will be adequate to maintain a 
credential-user subclass mapping, and leave simulator concerns for claims book 
keeping, consistent with identity framework modeling. The fields I was going to 
add to a user-simuser level can just as easily be modeled by application level 
claims.

Problem solved.

>>> // Yes, A is abstract
>>> abstract class A {}
>>>
>>> // B is not abstract, could inquire about B's
>>> class B : A {}
>>>
>>> // C is also not abstract, most of the app wants to work with C's
>>> class C : B {}
>>>
>>> In practice, something like this:
>>>
>>> abstract class Credential {}
>>>
>>> class User : Credential {}
>>>
>>> class SimulatorUser : User {}
>>>
>>> But we'll focus on the ABC's for now.
>>>
>>> My table design is table per class.
>>>
>>> CREATE TABLE A (...);
>>> CREATE TABLE B (...);
>>> CREATE TABLE C (...);
>>>
>>> And my mappings are:
>>>
>>> class AMap : ClassMap<A> {}
>>> class BMap : SubclassMap<B> {}
>>> class CMap : SubclassMap<C> {}
>>>
>>> I exported the configuration, and it seems that A (Credential) was
>>> mapped correctly.
>>>
>>> However, it seems that B (User) failed to map; neither did C
>(SimulatorUser).
>>
>> I take that back, partially... It seems that B did indeed receive a
>> mapping, which landed in the exported A file.
>>
>> However, I do not see the C mapping anywhere.
>>
>> To make it a bit more confusing, the mappings are joined across
>Schema
>> boundaries, i.e. "Security" versus "dbo", but I do not expect that
>> would make much of a difference when it comes to the mapping
>> themselves. More of a database administrative thing provisioning
>> permissions and such.
>>
>>> The obvious first question is, multiple-subclass, table-per-class is
>>> supported along these lines?
>>>
>>> I don't mind inheriting from BMap,if that's what it takes, but might
>>> like to preserve the B mapping at the same time, if possible.
>>>
>>> Any suggestions?
>>>
>>> Regards,
>>>
>>> Michael Powell

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fluent-nhibernate+unsubscr...@googlegroups.com.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
Visit this group at https://groups.google.com/group/fluent-nhibernate.
For more options, visit https://groups.google.com/d/optout.

Reply via email to