Hello!
It seems that the the JBoss EJB3/Hibernate stuff ignores the
@DiscriminatorValue annotation on JOIND inheritances:
| @Entity
| @Inheritance(strategy=JOINED)
| public abstract class parent {
|
| @Id
| Integer id;
|
| }
|
| @Entity
| @DiscriminatorValue("child")
| public class child extends parent {
|
| private String value;
|
| }
|
If I read the documentation correctly the table parent should have a column
DTYPE and for every persited child object it should have the value child.
I know this value is not actually necessary since I could simply inner join
child and parent but this becomes inefficient if more than a couple of classes
extend parent. And it is unefficient if all I'm interested in is some
aggregation of values in parent.
I am not sured if support for discriminator column is required by the specs but
Toplink (
http://www.oracle.com/technology/products/ias/toplink/jpa/howto/use-inheritance.html[/url]
) and Kodo
[url]http://docs.solarmetric.com/full/html/ejb3_overview_mapping_discrim.html
support this. To me this seems like a bug because it makes the inheritance
strategy JOINED far less useful.
Regards
Felix[/url]
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007994#4007994
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007994
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user