开发者

Component Inheritance

开发者 https://www.devze.com 2023-03-07 16:43 出处:网络
Can anyone give/point me to \'official references\' about component inheritance support in Nhibernate 3.10 ?

Can anyone give/point me to 'official references' about component inheritance support in Nhibernate 3.10 ? 开发者_Python百科Already google it, but never find any reference about that.

Thanks


NHibernate (and Hibernate for that matter) does not support component inheritance out of the box. You have two relatively unpleasant options:

  1. Map hierarchy as entities.
  2. Write custom hydration/dehydration code using IUserType. This workaround is described in this article (java, but should work for C#).

In the mean time you can vote for this feature to be implemented in Hibernate and maybe some day ported to NHibernate. NHibernate version of this feature request.


Here there's some doc but I'm not sure if this can help you:

https://ayende.com/blog/3941/nhibernate-mapping-inheritance

Updated

I think it's not possible! look here:

https://stackoverflow.com/q/3739806/735864

0

精彩评论

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