Fluent NHibernate mapping: one table, many classes?

It's certainly possible, assuming that your classes extend a common base class. This is called table-per-class strategy and instructions on how to map it are in the documentation .

Up vote 0 down vote favorite share g+ share fb share tw.

How would I go about mapping three classes to one table with fluent NHibernate. A "Type" column should indicate which class should be mapped. Is it even possble?

Kristoffer nhibernate orm fluent-nhibernate nhibernate-mapping mapping link|improve this question edited Oct 22 '09 at 14:53mxmissile2,991823 asked Oct 22 '09 at 14:25Kristoffer433311 74% accept rate.

It's certainly possible, assuming that your classes extend a common base class. This is called table-per-class strategy and instructions on how to map it are in the documentation.

Thanks! The're is an example of it at the end of the documentation. The properties are not virtual in the documentation, but they must be.

– Kristoffer Oct 22 '09 at 19:46.

What you're trying to do seems like a dead giveaway that this is the actual problem.

Well, I'm basically just curious. I was thinking about how I could denormalize the database (for increased performance) without touching the object model. – Kristoffer Oct 22 '09 at 19:52.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions