Neutral / sleeping discriminator in the subclass

I have a subclass with a discriminator, can I have a different discriminator in the subclass
I will try to explain. One discriminator in the Person table can be a type, and I have two subclasses Student and teacher, in the student subclass I have different student subclasses based on another column in the student record.
Now I use a combined subclass with discriminator, but I can not recognize in the subclass

!------ Person !-------------Student !--------------------Student type A !--------------------Student type B !-------------Teacher 
+4
source share
1 answer

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 harder for you, maybe you can split the combined subclass and use instaead? BTW nh grows faster, sometimes faster than a document, but I think this applies to NH 3.1.0 anyway

+2
source

Source: https://habr.com/ru/post/1346521/


All Articles