[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2257) Query.iterate() results differ from Query.list() 2

Milan Pecko (JIRA) noreply at atlassian.com
Tue Nov 21 09:45:04 EST 2006


Query.iterate() results differ from Query.list() 2
--------------------------------------------------

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

  Components: query-hql  
    Versions: 3.2.0.ga    
 Environment: Hibernate 3.2.0 ga, ASTQueryTranslator,
Sun Java 1.5.0-06, Windows XP
    Reporter: Milan Pecko
    Priority: Critical


I saw the problem with the same description(HHH-1946) but my problem occurs with hibernate 2.1.8 too.

The problem is a differnet number of results:
HQL : "select p.id,p.client from Portfolio as p"
SQL produced by list() :
"select portfolio0_.portfolioId as col_0_0_, portfolio0_.clientId as col_1_0_, subject1_.subjectId as subjectId194_, subject1_.name as name194_,... from PORTFOLIO_TBL portfolio0_ inner join SUBJECT_TBL subject1_ on portfolio0_.clientId=subject1_.subjectId"

SQL produced by iterate() :
 "select portfolio0_.portfolioId as col_0_0_, portfolio0_.clientId as col_1_0_ from PORTFOLIO_TBL portfolio0_"

when i changed HQL to : "select p.id,p.client.id from Portfolio as p"
the number of results is the same.
both functions produce the same SQL:"select portfolio0_.portfolioId as col_0_0_, portfolio0_.clientId as col_1_0_ from PORTFOLIO_TBL portfolio0_"





I dont know what resultset is correct "ids includes ids with client equals to null" or "ids with client only" but i think the number of result should be tha same for same HQL.










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