Free NHibernate and typical type automation

I use a machine for most of my model, but have a problem with generics. I have a ValueContainer<TValue> , and I am making it abstract so that it does not throw exceptions when autopile. Then I have to create classes like StringValueContainer to make it mapped. Needless to say, I do not like this approach, since I am completely satisfied with the birth classes.

So the question is, how do I manually map classes, such as ValueContainer<string> , that inherit from the automapped class? I tried to smoothly configure the subclass via SubclassMap, but this supposedly failed.

Just to clarify: I have StringValueContainer: ValueContainer<string> , but the StringValueContainer class StringValueContainer not add any value other than automapping, so I'm wondering if this can be done in a cleaner way.

+4
source share

All Articles