开发者

Nhibernate / hibernate discriminator in subclass

开发者 https://www.devze.com 2023-02-22 08:59 出处:网络
I have a subclass with a discriminator, can i have another discriminator in a subclass I\'ll try to explain

I have a subclass with a discriminator, can i have another discriminator in a subclass

I'll try to explain

One discriminator is in Person Table may be开发者_高级运维 type and i have two subclasses Student and teacher, in a student subclass i have different subclasses of student based on a different column in student record.

Now i am using joined subclass with discriminator but i'm not be able to discriminate in a subclass

!------ Person
!-------------Student 
!--------------------Student type A
!--------------------Student type B
!-------------Teacher   


As in the documentation: "Hibernate does not support mixing <subclass>, and <joined-subclass> and <union-subclass> mappings under the same root <class> element" this I think is a troubkle for you, maybe you can break the joined subclass and use a instaead ? BTW nh is growing faster, sometimes faster than the doc, but I think this still apply to NH 3.1.0

0

精彩评论

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