[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3642) EJB3 inheritance strategy TABLE_PER_CLASS does not work on HSQLDB
Norbert Sándor (JIRA)
noreply at atlassian.com
Thu Mar 26 03:24:39 EDT 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32719#action_32719 ]
Norbert Sándor commented on HHH-3642:
-------------------------------------
I forgot to mention (although it is in the forum post) that we have similar problem with Oracle 10g, not HSQLDB.
> EJB3 inheritance strategy TABLE_PER_CLASS does not work on HSQLDB
> -----------------------------------------------------------------
>
> Key: HHH-3642
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3642
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.3.1
> Environment: JBoss 5.0GA, Java 1.6, Hypersonic 1.8.0.8
> Reporter: Wolfgang Knauf
> Attachments: InheritanceTablePerClass.ear
>
>
> I use an EJB3 entity bean with inheritance strategy "TABLE_PER_CLASS":
> @Entity
> @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
> public abstract class Base implements Serializable
> {
> ...
> When loading a list of base classes, all subclass fields are null. The union subclause in the query does not work on HSQLDB.
> Attached is a full EJB sample, runnable on JBoss 4.2/5.0 (project export of Eclipse 3.4/WebTools 3.0 with sources). After deploying, it can be tested by browsing to http://localhost:8080/InheritanceTablePerClassWeb/
> See this output:
> ...
> Loading ALL
> Item: Child 1, child field 1: null
> Item: Child 2, child field 2: null
> Item: Child 3, child field 3: Field of Child3
> ...
> Here, all childs are loaded. The fields of type "Child1" and "Child2" are null, fields of type "Child3" are filled.
> This is probably a duplicate of http://opensource.atlassian.com/projects/hibernate/browse/HHH-2920
> The described workaround to change all NULL expressions to "cast (null as VARCHAR)" results in a working query, but I see no chance to pre-configure this query in the entity manager.
> I created another bug, because the impact is different (it breaks a feature of EJB3), and so I consider severity to be higher.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list