开发者

Fluent NHibernate mapping: one table, many classes

开发者 https://www.devze.com 2022-12-09 08:08 出处:网络
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 e开发者_运维百科ven possble?

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 e开发者_运维百科ven possble?

  • Kristoffer


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.


Are you in a situation where your data could be normalized? What you're trying to do seems like a dead giveaway that this is the actual problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消