[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2422) unexpected object loading with Mixing table per class hierarchy with table per subclass

Paul Song (JIRA) noreply at atlassian.com
Mon Feb 12 13:02:41 EST 2007


unexpected object loading with Mixing table per class hierarchy with table per subclass
---------------------------------------------------------------------------------------

         Key: HHH-2422
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2422
     Project: Hibernate3
        Type: Bug

  Components: core  
    Versions: 3.2.1, 3.2.0.cr4, 3.2.2, 3.2.0.ga, 3.2.0.cr5    
 Environment: Linux(Red Hat 4.0 AS) + JBOSS4.0.5.GA + Hibernate 3.2.2.GA + MySQL5.0.27 Community edition + JDK1.5_06
    Reporter: Paul Song
    Priority: Critical
 Attachments: sourceCode.rar

3 entity classes: Token, AudioToken, Actor. 
AudioToken is a subclass of Token, Token is a member variable of Actor. 
That means Actor instance may have Token object or AudioToken object at runtime.  The mapping definition of Token and Audio Token use Mixing table per class hierarchy with table per subclass. So the Audio Token has its own properties in a different sub table(AudioToken table) besides it has common properties in token table.

When loading actor, this actor will get its token object reference automatically according to mapping(lazy loading is false). Although the audio token object is returned, it did not contain information of sub table(i.e. serialNumber) but just that of parent table(i.e., id, type counter etc.) 

The same exact code package is working well with following Environment:

1, Windows2003 + JBOSS4.0.5.GA + Hibernate 3.2.2.GA + MySQL5.0.27 Community edition + JDK1.5_06
2, Windows2003 + WebLogic(9.1, 9.2)+ Hibernate 3.2.2.GA + MySQL5.0.27 Community edition + JDK1.5_06
3,Linux(Redhat 4.0 AS) + WebLogic(9.1, 9.2)+ Hibernate 3.2.2.GA + MySQL5.0.27 Community edition + JDK1.5_06

Except above unexpected object return, When I use AudioTokenDao to get the object by PK, I can get the object containing information of  both parent table and sub table. but If I use TokenDao to get the object by same PK, I can only get the object containing information of parent table(Token table). it's not expected this way but happened on environment of
Linux(Red Hat 4.0 AS) + JBOSS4.0.5.GA + Hibernate 3.2.2.GA + MySQL5.0.27 Community edition + JDK1.5_06



-- 
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