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:
- Map hierarchy as entities.
- 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
精彩评论