简体   繁体   English

是否会影响NHibernate映射C#中的继承类?

[英]Does affect the NHibernate mapping inherited classes in C#?

I have two classes which have exactly the same code: one of them refresh constantly it data during a game and the other keep this data in the server for a new run of the game. 我有两个类,它们的代码完全相同:一个类在游戏中不断刷新数据,另一个类将这些数据保存在服务器中以进行新的游戏。 I want to make an inheritance between these classes but i don't know if the NHibernate mapping overrides both of the classes losing the historical data. 我想在这些类之间进行继承,但是我不知道NHibernate映射是否会覆盖丢失历史数据的两个类。

不,NHibernate支持多种可靠的继承映射策略,并且不需要您专门从其类之一继承。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM