bohebolo
bohebolo

Reputation: 11

Component Inheritance

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

Thanks

Upvotes: 1

Views: 841

Answers (2)

danyolgiax
danyolgiax

Reputation: 13086

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

Upvotes: 0

Dmitry
Dmitry

Reputation: 17350

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.

Upvotes: 2

Related Questions