[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-939) 'class' property in HQL results in incorrect SQL for joined-subclass

Steve Ebersole (JIRA) noreply at atlassian.com
Thu Nov 16 14:36:05 EST 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-939?page=all ]
     
Steve Ebersole resolved HHH-939:
--------------------------------

    Resolution: Fixed

trunk / 3.2

> 'class' property in HQL results in incorrect SQL for joined-subclass
> --------------------------------------------------------------------
>
>          Key: HHH-939
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-939
>      Project: Hibernate3
>         Type: Bug

>   Components: query-hql
>     Versions: 3.1 beta 2
>  Environment: H3.1b2, Oracle
>     Reporter: Den Raskovalov
>     Assignee: Steve Ebersole
>      Fix For: 3.2.1

>
>
> select count(distinct obj.BO) from ru.naumen.core.indexer.CoreBOTitleIndexerSubstring as obj where obj.BO.class=ru.naumen.core.bobjects.person.CoreEmployee
> produces
> select count(distinct corebotitl0_.bo_) as col_0_0_ from TBL_BOTitleIndexerSS corebotitl0_, TBL_BO corebo1_ where corebotitl0_.bo_=corebo1_.UUID and upper(corebotitl0_.substring_)=upper(?) and decode(corebo1_.UUID, corebo1_10_.NCCP_UUID, 10, corebo1_18_.JC_ContactPerson_UUID, 18, corebo1_3_.SuperPerson_UUID, 3, corebo1_4_.Employee_UUID, 4, corebo1_8_.ContactPerson_UUID, 8, corebo1_11_.JuridicalClient_UUID, 11, corebo1_12_.NaturalClient_UUID, 12, corebo1_15_.AdditionalAgreement_UUID, 15, corebo1_27_.Project_UUID, 27, corebo1_1_.Root_UUID, 1, corebo1_2_.Person_UUID, 2, corebo1_5_.OU_UUID, 5, corebo1_6_.DBFile_UUID, 6, corebo1_7_.ClientCatalog_UUID, 7, corebo1_9_.Client_UUID, 9, corebo1_13_.Deal_UUID, 13, corebo1_14_.Contract_UUID, 14, corebo1_16_.Penalty_UUID, 16, corebo1_17_.Payment_UUID, 17, corebo1_19_.Agent_UUID, 19, corebo1_20_.Agent_Cat_UUID, 20, corebo1_21_.PaymentAct_UUID, 21, corebo1_22_.PaymentActComment_UUID, 22, corebo1_23_.PaymentActPaym_UUID, 23, corebo1_24_.MiniOffice_UUID, 24, corebo1_25_.MiniOffice_Cat_UUID, 25, corebo1_26_.Project_UUID, 26, corebo1_28_.Task_UUID, 28, 0)=4
> certainly,
> select distinct obj.BO from ru.naumen.core.indexer.CoreBOTitleIndexerSubstring as obj where obj.BO.class=ru.naumen.core.bobjects.person.CoreEmployee
> works fine

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