[hibernate-issues] [Hibernate-JIRA] Created: (EJB-367) Duplicated result in query with Inner join

rodrigo rosa (JIRA) noreply at atlassian.com
Thu Jun 5 22:07:33 EDT 2008


Duplicated result in query with Inner join
------------------------------------------

                 Key: EJB-367
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-367
             Project: Hibernate Entity Manager
          Issue Type: Bug
         Environment: Hibernate 3.2, PostgreSql
            Reporter: rodrigo rosa


The following query returns  m.titulo equals  to comunidade.titulo  when they are diferent in database. It seems that Hibernate repeat the the value for column with same name.

results = newSession.createSQLQuery("select m.id, m.titulo, m.resumo,m.corpo, m.autor_id, comunidade.titulo, count(v.id) as votos from noticia m  left join voto v on v.noticia_id=m.id  inner join usuario w on w.id=m.autor_id left outer join comunidade on w.comunidade_id=comunidade.id "+filtro+" group by m.id, m.corpo, m.titulo, m.resumo, m.autor_id, comunidade.titulo order by votos desc").list();

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